* Make video grabbing work again (if you are grabbing multiple streams

at different frame rates).
* Do the av_abort() change that is not otherwise worth checking in.

Originally committed as revision 620 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Philip Gladstone 2002-05-29 01:55:12 +00:00
parent e9c0a38ff0
commit c04643a2c2

View File

@ -422,8 +422,6 @@ static void do_video_out(AVFormatContext *s,
AVCodecContext *enc, *dec; AVCodecContext *enc, *dec;
#define VIDEO_BUFFER_SIZE (1024*1024) #define VIDEO_BUFFER_SIZE (1024*1024)
video_buffer= av_malloc(VIDEO_BUFFER_SIZE);
if(!video_buffer) return;
enc = &ost->st->codec; enc = &ost->st->codec;
dec = &ist->st->codec; dec = &ist->st->codec;
@ -438,6 +436,9 @@ static void do_video_out(AVFormatContext *s,
if (nb <= 0) if (nb <= 0)
return; return;
video_buffer= av_malloc(VIDEO_BUFFER_SIZE);
if(!video_buffer) return;
/* deinterlace : must be done before any resize */ /* deinterlace : must be done before any resize */
if (do_deinterlace) { if (do_deinterlace) {
int size; int size;
@ -805,7 +806,7 @@ static int av_encode(AVFormatContext **output_files,
} }
break; break;
default: default:
abort(); av_abort();
} }
} }
@ -1038,7 +1039,7 @@ static int av_encode(AVFormatContext **output_files,
ist->ticker_inited = 1; ist->ticker_inited = 1;
break; break;
default: default:
abort(); av_abort();
} }
} }
/* update pts */ /* update pts */
@ -1058,7 +1059,7 @@ static int av_encode(AVFormatContext **output_files,
ist->st->codec.frame_rate; ist->st->codec.frame_rate;
break; break;
default: default:
abort(); av_abort();
} }
ptr += ret; ptr += ret;
len -= ret; len -= ret;
@ -1082,7 +1083,7 @@ static int av_encode(AVFormatContext **output_files,
do_video_stats(ost, ist, frame_size); do_video_stats(ost, ist, frame_size);
break; break;
default: default:
abort(); av_abort();
} }
} else { } else {
/* no reencoding needed : output the packet directly */ /* no reencoding needed : output the packet directly */
@ -1580,7 +1581,7 @@ void opt_input_file(const char *filename)
frame_rate = rfps; frame_rate = rfps;
break; break;
default: default:
abort(); av_abort();
} }
} }
@ -1611,7 +1612,7 @@ void check_audio_video_inputs(int *has_video_ptr, int *has_audio_ptr)
has_video = 1; has_video = 1;
break; break;
default: default:
abort(); av_abort();
} }
} }
} }
@ -1873,7 +1874,7 @@ void prepare_grab(void)
has_video = 1; has_video = 1;
break; break;
default: default:
abort(); av_abort();
} }
} }
} }