avcodec/wmadec: also print the number of bits left in the nb_frames <= 0 case
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Jan 2015 00:48:32 +0000 (01:48 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 Jan 2015 02:33:02 +0000 (03:33 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmadec.c

index d32ca6f..b7fa070 100644 (file)
@@ -840,7 +840,8 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data,
         skip_bits(&s->gb, 4); /* super frame index */
         nb_frames = get_bits(&s->gb, 4) - (s->last_superframe_len <= 0);
         if (nb_frames <= 0) {
-            av_log(avctx, AV_LOG_ERROR, "nb_frames is %d\n", nb_frames);
+            av_log(avctx, AV_LOG_ERROR, "nb_frames is %d bits left %d\n",
+                   nb_frames, get_bits_left(&s->gb));
             return AVERROR_INVALIDDATA;
         }
     } else