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
1 changed files with 2 additions and 1 deletions

View File

@ -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);