diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ea1be3cb105bc2ae213c0b77aac41d3158b81724..1b07b3af4976275bfd83c55336630eee40752a07 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -7853,7 +7853,7 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
         case NAL_AUXILIARY_SLICE:
             break;
         default:
-            av_log(avctx, AV_LOG_ERROR, "Unknown NAL code: %d\n", h->nal_unit_type);
+            av_log(avctx, AV_LOG_ERROR, "Unknown NAL code: %d (%d bits)\n", h->nal_unit_type, bit_length);
         }
     }