Ticket #3710: 3710-dbg2.patch

File 3710-dbg2.patch, 1.4 KB (added by danielk, 17 years ago)

Debug patch 2

  • libs/libavcodec/mpegvideo.c

     
    393393
    394394        if(r<0 || !pic->age || !pic->type || !pic->data[0]){
    395395            av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (%d %d %d %p)\n", r, pic->age, pic->type, pic->data[0]);
     396            if (r>=0)
     397                s->avctx->release_buffer(s->avctx, (AVFrame*)pic);
    396398            return -1;
    397399        }
    398400
    399401        if(s->linesize && (s->linesize != pic->linesize[0] || s->uvlinesize != pic->linesize[1])){
    400             av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (stride changed)\n");
     402            av_log(s->avctx, AV_LOG_ERROR,
     403                   "get_buffer() failed (stride changed YUV: "
     404                   "%d->%d, %d->%d, %d->%d)\n",
     405                   s->linesize, pic->linesize[0],
     406                   s->uvlinesize, pic->linesize[1],
     407                   s->uvlinesize, pic->linesize[2]);
     408            if (r>=0)
     409                s->avctx->release_buffer(s->avctx, (AVFrame*)pic);
    401410            return -1;
    402411        }
    403412
    404413        if(pic->linesize[1] != pic->linesize[2]){
    405414            av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (uv stride mismatch)\n");
     415            if (r>=0)
     416                s->avctx->release_buffer(s->avctx, (AVFrame*)pic);
    406417            return -1;
    407418        }
    408419