avformat/yuv4mpegdec: use proper error codes

This commit is contained in:
Paul B Mahol 2020-03-19 11:08:42 +01:00
parent 08d46cb586
commit 4eb5dfb52e
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ static int yuv4_read_header(AVFormatContext *s)
} else { } else {
av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown " av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown "
"pixel format.\n"); "pixel format.\n");
return -1; return AVERROR_INVALIDDATA;
} }
while (tokstart < header_end && *tokstart != 0x20) while (tokstart < header_end && *tokstart != 0x20)
tokstart++; tokstart++;
@ -240,7 +240,7 @@ static int yuv4_read_header(AVFormatContext *s)
if (width == -1 || height == -1) { if (width == -1 || height == -1) {
av_log(s, AV_LOG_ERROR, "YUV4MPEG has invalid header.\n"); av_log(s, AV_LOG_ERROR, "YUV4MPEG has invalid header.\n");
return -1; return AVERROR_INVALIDDATA;
} }
if (pix_fmt == AV_PIX_FMT_NONE) { if (pix_fmt == AV_PIX_FMT_NONE) {