1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

better timebase selection heuristic for video stream copy

fixes -ss -t -vcodec copy

Originally committed as revision 6847 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2006-10-31 00:39:02 +00:00
parent 20cd83e276
commit d29de719a0

View File

@ -1535,7 +1535,10 @@ static int av_encode(AVFormatContext **output_files,
codec->bit_rate = icodec->bit_rate;
codec->extradata= icodec->extradata;
codec->extradata_size= icodec->extradata_size;
codec->time_base = icodec->time_base;
if(av_q2d(icodec->time_base) > av_q2d(ist->st->time_base))
codec->time_base = icodec->time_base;
else
codec->time_base = ist->st->time_base;
switch(codec->codec_type) {
case CODEC_TYPE_AUDIO:
codec->sample_rate = icodec->sample_rate;