diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-03-13 21:45:05 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-03-17 22:36:56 +0100 |
commit | f35f8eeb0dd65bd24b479bc5d48759007aba3d29 (patch) | |
tree | 6e1c645bb195ede12b4e96ab2bb5eca4e5a555a9 /libavformat/utils.c | |
parent | 9ade26ee915ec16bc6e06beb337ead2c3bc13c2a (diff) | |
download | ffmpeg-f35f8eeb0dd65bd24b479bc5d48759007aba3d29.tar.gz |
lavf: only set average frame rate for video.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 1fea72fc69..effefd551a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2421,11 +2421,11 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } for(i=0;i<ic->nb_streams;i++) { st = ic->streams[i]; - if (st->codec_info_nb_frames>2 && !st->avg_frame_rate.num && st->info->codec_info_duration) - av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, - (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, - st->info->codec_info_duration*(int64_t)st->time_base.num, 60000); if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + if (st->codec_info_nb_frames>2 && !st->avg_frame_rate.num && st->info->codec_info_duration) + av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den, + (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den, + st->info->codec_info_duration*(int64_t)st->time_base.num, 60000); // the check for tb_unreliable() is not completely correct, since this is not about handling // a unreliable/inexact time base, but a time base that is finer than necessary, as e.g. // ipmovie.c produces. |