Make it clear that this is not a failure of get_buffer/the user, but a deficit of mpegvideo.
Unified · Split
| @@ -102,20 +102,19 @@ static int handle_pic_linesizes(AVCodecContext *avctx, Picture *pic, · 101 unmodified lines | ||
| 102 | 102 | |
| 103 | 103 | if ((linesize && linesize != pic->f->linesize[0]) || |
| 104 | 104 | (uvlinesize && uvlinesize != pic->f->linesize[1])) { |
| 105 | − av_log(avctx, AV_LOG_ERROR, | |
| 106 | − "get_buffer() failed (stride changed: linesize=%d/%d uvlinesize=%d/%d)\n", | |
| 105 | + av_log(avctx, AV_LOG_ERROR, "Stride change unsupported: " | |
| 106 | + "linesize=%d/%d uvlinesize=%d/%d)\n", | |
| 107 | 107 | linesize, pic->f->linesize[0], |
| 108 | 108 | uvlinesize, pic->f->linesize[1]); |
| 109 | 109 | ff_mpeg_unref_picture(pic); |
| 110 | − return -1; | |
| 110 | + return AVERROR_PATCHWELCOME; | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | if (av_pix_fmt_count_planes(pic->f->format) > 2 && |
| 114 | 114 | pic->f->linesize[1] != pic->f->linesize[2]) { |
| 115 | − av_log(avctx, AV_LOG_ERROR, | |
| 116 | − "get_buffer() failed (uv stride mismatch)\n"); | |
| 115 | + av_log(avctx, AV_LOG_ERROR, "uv stride mismatch unsupported\n"); | |
| 117 | 116 | ff_mpeg_unref_picture(pic); |
| 118 | − return -1; | |
| 117 | + return AVERROR_PATCHWELCOME; | |
| 119 | 118 | } |
| 120 | 119 | |
| 121 | 120 | ret = ff_mpeg_framesize_alloc(avctx, me, sc, |