[FFmpeg-cvslog] avformat/utils: Call ff_rfps_add_frame() only for video
Michael Niedermayer
git at videolan.org
Mon Jun 2 17:17:20 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 2 17:09:53 2014 +0200| [6f6edfe1c0ede584ea4edf5bb0fc9b961f299631] | 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>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f6edfe1c0ede584ea4edf5bb0fc9b961f299631
---
libavformat/utils.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6df426b..d761768 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);
More information about the ffmpeg-cvslog
mailing list