aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorhung kuishing <hungkuishing@outlook.com>2023-12-07 06:44:06 +0000
committerHaihao Xiang <haihao.xiang@intel.com>2023-12-18 09:39:24 +0800
commit6d129d8df5a3d8172a9565709a0b4ad4c86a8b52 (patch)
treec85ee43c1cc1fca108281f692bac75539a9def6f /doc
parent8d24a28d066ddd0f865a76860f19ef71fd0dcc24 (diff)
downloadffmpeg-6d129d8df5a3d8172a9565709a0b4ad4c86a8b52.tar.gz
doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
Signed-off-by: clarkh <hungkuishing@outlook.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/qsv_transcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index 48128b200c..972126800b 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -62,10 +62,10 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
return 0;
key = strtok(optstr, " ");
if (key == NULL)
- return AVERROR(ENAVAIL);
+ return AVERROR(EINVAL);
value = strtok(NULL, " ");
if (value == NULL)
- return AVERROR(ENAVAIL);
+ return AVERROR(EINVAL);
av_dict_set(opt, key, value, 0);
do {
key = strtok(NULL, " ");
@@ -73,7 +73,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
return 0;
value = strtok(NULL, " ");
if (value == NULL)
- return AVERROR(ENAVAIL);
+ return AVERROR(EINVAL);
av_dict_set(opt, key, value, 0);
} while(key != NULL);
return 0;
@@ -181,7 +181,7 @@ static int open_input_file(char *filename)
break;
default:
fprintf(stderr, "Codec is not supportted by qsv\n");
- return AVERROR(ENAVAIL);
+ return AVERROR(EINVAL);
}
if (!(decoder_ctx = avcodec_alloc_context3(decoder)))