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
1080 if ((s->slice_width & (s->slice_width - 1)) ||1080 if ((s->slice_width & (s->slice_width - 1)) ||
1081 (s->slice_height & (s->slice_height - 1))) {1081 (s->slice_height & (s->slice_height - 1))) {
1082 av_log(avctx, AV_LOG_ERROR, "Slice size is not a power of two!\n");1082 av_log(avctx, AV_LOG_ERROR, "Slice size is not a power of two!\n");
1083 return AVERROR_UNKNOWN;1083 return AVERROR(EINVAL);
1084 }1084 }
1085 1085
1086 if ((s->slice_width > avctx->width) ||1086 if ((s->slice_width > avctx->width) ||
1087 (s->slice_height > avctx->height)) {1087 (s->slice_height > avctx->height)) {
1088 av_log(avctx, AV_LOG_ERROR, "Slice size is bigger than the image!\n");1088 av_log(avctx, AV_LOG_ERROR, "Slice size is bigger than the image!\n");
1089 return AVERROR_UNKNOWN;1089 return AVERROR(EINVAL);
1090 }1090 }
1091 1091
1092 if (s->base_vf <= 0) {1092 if (s->base_vf <= 0) {
@@ -1096,7 +1096,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) · 3 unmodified lines
1096 } else {1096 } else {
1097 av_log(avctx, AV_LOG_WARNING, "Given format does not strictly comply with "1097 av_log(avctx, AV_LOG_WARNING, "Given format does not strictly comply with "
1098 "the specifications, decrease strictness to use it.\n");1098 "the specifications, decrease strictness to use it.\n");
1099 return AVERROR_UNKNOWN;1099 return AVERROR(EINVAL);
1100 }1100 }
1101 } else {1101 } else {
1102 av_log(avctx, AV_LOG_INFO, "Selected base video format = %i (%s)\n",1102 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