diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-02 17:09:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-02 17:09:53 +0200 |
commit | 6f6edfe1c0ede584ea4edf5bb0fc9b961f299631 (patch) | |
tree | d1a392f045d7d0534610d7e6e2c9877a66ac7b9b | |
parent | cdfd9717edac118968e63e6f83c3e45a7e337833 (diff) | |
download | ffmpeg-6f6edfe1c0ede584ea4edf5bb0fc9b961f299631.tar.gz |
avformat/utils: Call ff_rfps_add_frame() only for video
This avoids some unneeded computations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 6df426b8d9..d761768a74 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3328,7 +3328,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) } } #if FF_API_R_FRAME_RATE - ff_rfps_add_frame(ic, st, pkt->dts); + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) + ff_rfps_add_frame(ic, st, pkt->dts); #endif if (st->parser && st->parser->parser->split && !st->codec->extradata) { int i = st->parser->parser->split(st->codec, pkt->data, pkt->size); |