[FFmpeg-devel,2/5] avcodec/sunrast: Fix return type for "unsupported (compression) type"

Submitted by Michael Niedermayer on Sept. 21, 2019, 4:57 p.m.

Details

Message ID 20190921165728.24496-2-michael@niedermayer.cc
State Accepted
Commit 0e8b7709a92afd7c10b4b5861870f6e365f280c3
Headers show

Commit Message

Michael Niedermayer Sept. 21, 2019, 4:57 p.m.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/sunrast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Sept. 21, 2019, 5 p.m.
LGTM

On 9/21/19, Michael Niedermayer <michael@niedermayer.cc> wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/sunrast.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
> index 0af5626e35..883421202a 100644
> --- a/libavcodec/sunrast.c
> +++ b/libavcodec/sunrast.c
> @@ -72,7 +72,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx,
> void *data,
>
>      if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) {
>          av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n");
> -        return -1;
> +        return AVERROR_PATCHWELCOME;
>      }
>
>      switch (depth) {
> --
> 2.23.0
>
> _______________________________________________
> 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".
Michael Niedermayer Sept. 22, 2019, 4:18 p.m.
On Sat, Sep 21, 2019 at 07:00:41PM +0200, Paul B Mahol wrote:
> LGTM

will apply

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 0af5626e35..883421202a 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -72,7 +72,7 @@  static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
 
     if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) {
         av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n");
-        return -1;
+        return AVERROR_PATCHWELCOME;
     }
 
     switch (depth) {