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 22:59:50 +0200
commit96047b3150c4b918257ed50bfeecae0e4e43c362 (patch)
tree103f5359c70e5b2b03bc487a6ebbd6dfc16e6b41
parent2545defeac7730cd5f4fae3c06af1f4da736afa4 (diff)
downloadffmpeg-96047b3150c4b918257ed50bfeecae0e4e43c362.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> (cherry picked from commit 6f6edfe1c0ede584ea4edf5bb0fc9b961f299631) 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 bff961a90b..27b37b22e1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3234,7 +3234,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);