h264: log extradata skip only for non-ignored NALs
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 20 Sep 2013 13:42:41 +0000 (15:42 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 24 Sep 2013 11:24:28 +0000 (13:24 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/h264.c

index 9d012c5..323d191 100644 (file)
@@ -4559,8 +4559,11 @@ again:
                 (h->avctx->active_thread_type & FF_THREAD_FRAME) &&
                 (hx->nal_unit_type != NAL_PPS &&
                  hx->nal_unit_type != NAL_SPS)) {
                 (h->avctx->active_thread_type & FF_THREAD_FRAME) &&
                 (hx->nal_unit_type != NAL_PPS &&
                  hx->nal_unit_type != NAL_SPS)) {
-                av_log(avctx, AV_LOG_INFO, "Ignoring NAL unit %d during "
-                       "extradata parsing\n", hx->nal_unit_type);
+                if (hx->nal_unit_type < NAL_AUD ||
+                    hx->nal_unit_type > NAL_AUXILIARY_SLICE)
+                    av_log(avctx, AV_LOG_INFO,
+                           "Ignoring NAL unit %d during extradata parsing\n",
+                           hx->nal_unit_type);
                 hx->nal_unit_type = NAL_FF_IGNORE;
             }
             err = 0;
                 hx->nal_unit_type = NAL_FF_IGNORE;
             }
             err = 0;