Message ID | 20200319101346.8883-1-onemda@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/yuv4mpegdec: use proper error codes |
Related | show |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | pending | |
andriy/ffmpeg-patchwork | success | Applied patch |
andriy/ffmpeg-patchwork | success | Configure finished |
andriy/ffmpeg-patchwork | success | Make finished |
andriy/ffmpeg-patchwork | success | Make fate finished |
diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index a11567e5ca..addc03057e 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -142,7 +142,7 @@ static int yuv4_read_header(AVFormatContext *s) } else { av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown " "pixel format.\n"); - return -1; + return AVERROR_INVALIDDATA; } while (tokstart < header_end && *tokstart != 0x20) tokstart++; @@ -240,7 +240,7 @@ static int yuv4_read_header(AVFormatContext *s) if (width == -1 || height == -1) { av_log(s, AV_LOG_ERROR, "YUV4MPEG has invalid header.\n"); - return -1; + return AVERROR_INVALIDDATA; } if (pix_fmt == AV_PIX_FMT_NONE) {
Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavformat/yuv4mpegdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)