Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
@ 2023-12-07  6:44 hung kuishing
  2023-12-07  7:36 ` Xiang, Haihao
  0 siblings, 1 reply; 4+ messages in thread
From: hung kuishing @ 2023-12-07  6:44 UTC (permalink / raw)
  To: ffmpeg-devel

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)))
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
  2023-12-07  6:44 [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio hung kuishing
@ 2023-12-07  7:36 ` Xiang, Haihao
  2023-12-15  7:19   ` hung kuishing
  0 siblings, 1 reply; 4+ messages in thread
From: Xiang, Haihao @ 2023-12-07  7:36 UTC (permalink / raw)
  To: ffmpeg-devel

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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
  2023-12-07  7:36 ` Xiang, Haihao
@ 2023-12-15  7:19   ` hung kuishing
  2023-12-18  6:49     ` Xiang, Haihao
  0 siblings, 1 reply; 4+ messages in thread
From: hung kuishing @ 2023-12-15  7:19 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

> 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?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio
  2023-12-15  7:19   ` hung kuishing
@ 2023-12-18  6:49     ` Xiang, Haihao
  0 siblings, 0 replies; 4+ messages in thread
From: Xiang, Haihao @ 2023-12-18  6:49 UTC (permalink / raw)
  To: ffmpeg-devel

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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-18  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07  6:44 [FFmpeg-devel] [PATCH] doc/examples/qsv_transcode: EINVAL is more appropriate and ENAVAIL will fail build with visual studio hung kuishing
2023-12-07  7:36 ` Xiang, Haihao
2023-12-15  7:19   ` hung kuishing
2023-12-18  6:49     ` Xiang, Haihao

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git