aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-02 17:09:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-02 17:09:53 +0200
commit6f6edfe1c0ede584ea4edf5bb0fc9b961f299631 (patch)
treed1a392f045d7d0534610d7e6e2c9877a66ac7b9b
parentcdfd9717edac118968e63e6f83c3e45a7e337833 (diff)
downloadffmpeg-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.c3
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);