Commit d29de719 authored by Michael Niedermayer's avatar Michael Niedermayer

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
parent 20cd83e2
...@@ -1535,7 +1535,10 @@ static int av_encode(AVFormatContext **output_files, ...@@ -1535,7 +1535,10 @@ static int av_encode(AVFormatContext **output_files,
codec->bit_rate = icodec->bit_rate; codec->bit_rate = icodec->bit_rate;
codec->extradata= icodec->extradata; codec->extradata= icodec->extradata;
codec->extradata_size= icodec->extradata_size; 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) { switch(codec->codec_type) {
case CODEC_TYPE_AUDIO: case CODEC_TYPE_AUDIO:
codec->sample_rate = icodec->sample_rate; codec->sample_rate = icodec->sample_rate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment