diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-10-31 00:39:02 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-10-31 00:39:02 +0000 |
commit | d29de719a090effe244bdeedc72e34b80ac46618 (patch) | |
tree | c72015279718830525b87a2eac55e479b0135ed9 /ffmpeg.c | |
parent | 20cd83e276fd3930cb58bc5070c6c33ae3bbb25b (diff) | |
download | ffmpeg-d29de719a090effe244bdeedc72e34b80ac46618.tar.gz |
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
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |