==Sequencer & ffmpeg==

Bugfixes:
- hddaudio now allocates it's decode buffer + AVCODEC_MAX_AUDIO_FRAME_SIZE
  safety interval. (The former code expected all decoded audio frames to
  be the same size which can hurt under some circumstances e.g. VBR files)
- writeffmpeg: some pointers where not initialized on start and after
  deletion not set to null. Could segfault randomly on error conditions.
- drawseq: use startdisp and enddisp to decide, if a strip should be drawn.
  (Just extend strips first or last frame beyond screen dimensions in
  the previous version and watch the strip disappear)
This commit is contained in:
2006-06-04 18:05:47 +00:00
parent 42c5725349
commit df782b1122
3 changed files with 11 additions and 9 deletions

View File

@@ -66,10 +66,10 @@ static int ffmpeg_multiplex_audio = 1;
static int ffmpeg_autosplit = 0;
static int ffmpeg_autosplit_count = 0;
static AVFormatContext* outfile;
static AVStream* video_stream;
static AVStream* audio_stream;
static AVFrame* current_frame;
static AVFormatContext* outfile = 0;
static AVStream* video_stream = 0;
static AVStream* audio_stream = 0;
static AVFrame* current_frame = 0;
static uint8_t* video_buffer = 0;
static int video_buffersize = 0;
@@ -663,6 +663,7 @@ void end_ffmpeg(void)
/* free the temp buffer */
if (current_frame) {
delete_picture(current_frame);
current_frame = 0;
}
if (outfile && outfile->oformat) {
if (!(outfile->oformat->flags & AVFMT_NOFILE)) {

View File

@@ -1026,8 +1026,8 @@ void drawseqspace(ScrArea *sa, void *spacedata)
seq= ed->seqbasep->first;
while(seq) { /* bound box test, dont draw outside the view */
if (seq->flag & SELECT ||
seq->start > v2d->cur.xmax ||
seq->start+seq->len < v2d->cur.xmin ||
seq->startdisp > v2d->cur.xmax ||
seq->enddisp < v2d->cur.xmin ||
seq->machine+1.0 < v2d->cur.ymin ||
seq->machine > v2d->cur.ymax)
{
@@ -1043,8 +1043,8 @@ void drawseqspace(ScrArea *sa, void *spacedata)
seq= ed->seqbasep->first;
while(seq) { /* bound box test, dont draw outside the view */
if (!(seq->flag & SELECT) ||
seq->start > v2d->cur.xmax ||
seq->start+seq->len < v2d->cur.xmin ||
seq->startdisp > v2d->cur.xmax ||
seq->enddisp < v2d->cur.xmin ||
seq->machine+1.0 < v2d->cur.ymin ||
seq->machine > v2d->cur.ymax)
{

View File

@@ -170,7 +170,8 @@ struct hdaudio * sound_open_hdaudio(char * filename)
* 2;
rval->decode_cache = (short*) MEM_mallocN(
rval->decode_cache_size * sizeof(short),
rval->decode_cache_size * sizeof(short)
+ AVCODEC_MAX_AUDIO_FRAME_SIZE,
"hdaudio decode cache");
rval->decode_pos = 0;
rval->target_channels = -1;