mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-17 20:40:07 +01:00
doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
Signed-off-by: clarkh <hungkuishing@outlook.com>
(cherry picked from commit 6d129d8df5)
This commit is contained in:
committed by
Timo Rothenpieler
parent
735acddb8a
commit
43a7ea8101
@@ -62,10 +62,10 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
|
|||||||
return 0;
|
return 0;
|
||||||
key = strtok(optstr, " ");
|
key = strtok(optstr, " ");
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
return AVERROR(ENAVAIL);
|
return AVERROR(EINVAL);
|
||||||
value = strtok(NULL, " ");
|
value = strtok(NULL, " ");
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
return AVERROR(ENAVAIL);
|
return AVERROR(EINVAL);
|
||||||
av_dict_set(opt, key, value, 0);
|
av_dict_set(opt, key, value, 0);
|
||||||
do {
|
do {
|
||||||
key = strtok(NULL, " ");
|
key = strtok(NULL, " ");
|
||||||
@@ -73,7 +73,7 @@ static int str_to_dict(char* optstr, AVDictionary **opt)
|
|||||||
return 0;
|
return 0;
|
||||||
value = strtok(NULL, " ");
|
value = strtok(NULL, " ");
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
return AVERROR(ENAVAIL);
|
return AVERROR(EINVAL);
|
||||||
av_dict_set(opt, key, value, 0);
|
av_dict_set(opt, key, value, 0);
|
||||||
} while(1);
|
} while(1);
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ static int open_input_file(char *filename)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Codec is not supportted by qsv\n");
|
fprintf(stderr, "Codec is not supportted by qsv\n");
|
||||||
return AVERROR(ENAVAIL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(decoder_ctx = avcodec_alloc_context3(decoder)))
|
if (!(decoder_ctx = avcodec_alloc_context3(decoder)))
|
||||||
|
|||||||
Reference in New Issue
Block a user