Message ID | PH7PR11MB74306DE032ED1A253C4121ACC48BA@PH7PR11MB7430.namprd11.prod.outlook.com |
---|---|
State | Accepted |
Commit | 6d129d8df5a3d8172a9565709a0b4ad4c86a8b52 |
Headers | show |
Series | [FFmpeg-devel] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Do, 2023-12-07 at 06:44 +0000, hung kuishing wrote: > Signed-off-by: clarkh <hungkuishing@outlook.com> > --- > doc/examples/qsv_transcode.c | 8 ++++---- > 1 file 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))) LGTM, thanks for fixing the issue. BRs Haihao
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Xiang, > Haihao > Sent: Thursday, December 7, 2023 3:37 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is > more appropriate and ENAVAIL will fail build with visual studio > > On Do, 2023-12-07 at 06:44 +0000, hung kuishing wrote: > > Signed-off-by: clarkh <hungkuishing@outlook.com> > > --- > > doc/examples/qsv_transcode.c | 8 ++++---- > > 1 file 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))) > > LGTM, thanks for fixing the issue. > > BRs > Haihao who can help to merge this patch?
On Vr, 2023-12-15 at 07:19 +0000, hung kuishing wrote: > > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Xiang, > > Haihao > > Sent: Thursday, December 7, 2023 3:37 PM > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is > > more appropriate and ENAVAIL will fail build with visual studio > > > > On Do, 2023-12-07 at 06:44 +0000, hung kuishing wrote: > > > Signed-off-by: clarkh <hungkuishing@outlook.com> > > > --- > > > doc/examples/qsv_transcode.c | 8 ++++---- > > > 1 file 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))) > > > > LGTM, thanks for fixing the issue. > > > > BRs > > Haihao > > who can help to merge this patch? Applied, Thanks Haihao
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)))
Signed-off-by: clarkh <hungkuishing@outlook.com> --- doc/examples/qsv_transcode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)