[FFmpeg-cvslog] has_decode_delay_been_guessed: skip guessing when sps. num_reorder_frames is available

Michael Niedermayer git at videolan.org
Mon Jul 2 23:22:28 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul  2 23:18:32 2012 +0200| [4e9e0700fb8fd89b565032e6f049b91014ec1f3c] | committer: Michael Niedermayer

has_decode_delay_been_guessed: skip guessing when sps.num_reorder_frames is available

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

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

 libavformat/utils.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 00a8239..67616af 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2285,6 +2285,11 @@ static int has_codec_parameters(AVStream *st)
 static int has_decode_delay_been_guessed(AVStream *st)
 {
     if(st->codec->codec_id != CODEC_ID_H264) return 1;
+#if CONFIG_H264_DECODER
+    if(st->codec->has_b_frames &&
+       avpriv_h264_has_num_reorder_frames(st->codec) == st->codec->has_b_frames)
+        return 1;
+#endif
     if(st->codec->has_b_frames<3)
         return st->info->nb_decoded_frames >= 6;
     return st->info->nb_decoded_frames >= 20;



More information about the ffmpeg-cvslog mailing list