Browse Source

avcodec/rawdec: Print stride and packet size at debug level

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0
Mats Peterson Michael Niedermayer 10 years ago
parent
commit
4e5db87174
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/rawdec.c

+ 2
- 0
libavcodec/rawdec.c View File

@@ -199,6 +199,8 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
else
stride = avpkt->size / avctx->height;

av_log(avctx, AV_LOG_DEBUG, "PACKET SIZE: %d, STRIDE: %d\n", avpkt->size, stride);

if (stride == 0 || avpkt->size < stride * avctx->height) {
av_log(avctx, AV_LOG_ERROR, "Packet too small (%d)\n", avpkt->size);
return AVERROR_INVALIDDATA;


Loading…
Cancel
Save