]> git.sesse.net Git - ffmpeg/commitdiff
h264: Fix decoding delay for Intra only streams
authorAnton Mitrofanov <BugMaster@narod.ru>
Sun, 8 May 2016 11:28:00 +0000 (13:28 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sun, 12 Jun 2016 18:29:29 +0000 (20:29 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/h264_ps.c

index f6cd1ca76004a9f3fb044bc334eb9789fc8238c8..8d567cad2581fef01caceada1d58e9b5ca880a0d 100644 (file)
@@ -530,7 +530,8 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
 
     /* if the maximum delay is not stored in the SPS, derive it based on the
      * level */
-    if (!sps->bitstream_restriction_flag) {
+    if (!sps->bitstream_restriction_flag &&
+        (sps->ref_frame_count || avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)) {
         sps->num_reorder_frames = MAX_DELAYED_PIC_COUNT - 1;
         for (i = 0; i < FF_ARRAY_ELEMS(level_max_dpb_mbs); i++) {
             if (level_max_dpb_mbs[i][0] == sps->level_idc) {