avformat/utils: Call ff_rfps_add_frame() only for video

This avoids some unneeded computations

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-06-02 17:09:53 +02:00
parent cdfd9717ed
commit 6f6edfe1c0

View File

@@ -3328,6 +3328,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
} }
} }
#if FF_API_R_FRAME_RATE #if FF_API_R_FRAME_RATE
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
ff_rfps_add_frame(ic, st, pkt->dts); ff_rfps_add_frame(ic, st, pkt->dts);
#endif #endif
if (st->parser && st->parser->parser->split && !st->codec->extradata) { if (st->parser && st->parser->parser->split && !st->codec->extradata) {