History

avcodec/vc2enc: Improve error codes

Andreas Rheinhardt committed 1 year ago

Commit df824211 parent 494061a1 file · +3 −3Browse files

Unified · Split

libavcodec/vc2enc.c+3−3
@@ -1080,13 +1080,13 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) · 1079 unmodified lines
10801080 if ((s->slice_width & (s->slice_width - 1)) ||
10811081 (s->slice_height & (s->slice_height - 1))) {
10821082 av_log(avctx, AV_LOG_ERROR, "Slice size is not a power of two!\n");
1083− return AVERROR_UNKNOWN;
1083+ return AVERROR(EINVAL);
10841084 }
10851085
10861086 if ((s->slice_width > avctx->width) ||
10871087 (s->slice_height > avctx->height)) {
10881088 av_log(avctx, AV_LOG_ERROR, "Slice size is bigger than the image!\n");
1089− return AVERROR_UNKNOWN;
1089+ return AVERROR(EINVAL);
10901090 }
10911091
10921092 if (s->base_vf <= 0) {
@@ -1096,7 +1096,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) · 3 unmodified lines
10961096 } else {
10971097 av_log(avctx, AV_LOG_WARNING, "Given format does not strictly comply with "
10981098 "the specifications, decrease strictness to use it.\n");
1099− return AVERROR_UNKNOWN;
1099+ return AVERROR(EINVAL);
11001100 }
11011101 } else {
11021102 av_log(avctx, AV_LOG_INFO, "Selected base video format = %i (%s)\n",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t