[FFmpeg-cvslog] avformat/utils: Call ff_rfps_add_frame() only for video

Michael Niedermayer git at videolan.org
Mon Jun 2 23:06:56 CEST 2014


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Jun  2 17:09:53 2014 +0200| [96047b3150c4b918257ed50bfeecae0e4e43c362] | committer: Michael Niedermayer

avformat/utils: Call ff_rfps_add_frame() only for video

This avoids some unneeded computations

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 6f6edfe1c0ede584ea4edf5bb0fc9b961f299631)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96047b3150c4b918257ed50bfeecae0e4e43c362
---

 libavformat/utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index bff961a..27b37b2 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);



More information about the ffmpeg-cvslog mailing list