Commit 6f6edfe1 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/utils: Call ff_rfps_add_frame() only for video

This avoids some unneeded computations
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cdfd9717
...@@ -3328,7 +3328,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) ...@@ -3328,7 +3328,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
} }
} }
#if FF_API_R_FRAME_RATE #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 #endif
if (st->parser && st->parser->parser->split && !st->codec->extradata) { if (st->parser && st->parser->parser->split && !st->codec->extradata) {
int i = st->parser->parser->split(st->codec, pkt->data, pkt->size); int i = st->parser->parser->split(st->codec, pkt->data, pkt->size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment