[FFmpeg-devel,2/2] avcodec/hevcdec: Fix return code for explode mode

Submitted by Michael Niedermayer on March 24, 2019, 10:55 a.m.

Details

Message ID 20190324105544.5335-2-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer March 24, 2019, 10:55 a.m.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/hevcdec.c | 1 +
 1 file changed, 1 insertion(+)

Comments

James Almer March 24, 2019, 2:17 p.m.
On 3/24/2019 7:55 AM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/hevcdec.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index fe4b5fdb5b..b7e2d68f5e 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -2923,6 +2923,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
>              return ret;
>          if (ret == 1) {
>              av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n");
> +            ret = AVERROR_INVALIDDATA;
>              goto fail;
>          }

I'd prefer if you squash all the patches before pushing, with or without
my suggested changes for patch 1/2.
Michael Niedermayer March 27, 2019, 12:20 a.m.
On Sun, Mar 24, 2019 at 11:17:37AM -0300, James Almer wrote:
> On 3/24/2019 7:55 AM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavcodec/hevcdec.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> > index fe4b5fdb5b..b7e2d68f5e 100644
> > --- a/libavcodec/hevcdec.c
> > +++ b/libavcodec/hevcdec.c
> > @@ -2923,6 +2923,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
> >              return ret;
> >          if (ret == 1) {
> >              av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n");
> > +            ret = AVERROR_INVALIDDATA;
> >              goto fail;
> >          }
> 
> I'd prefer if you squash all the patches before pushing, with or without
> my suggested changes for patch 1/2.

changed and new patch posted
will apply after sleeping a few hours if there are no suggestions for
more changes by then

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index fe4b5fdb5b..b7e2d68f5e 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2923,6 +2923,7 @@  static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
             return ret;
         if (ret == 1) {
             av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n");
+            ret = AVERROR_INVALIDDATA;
             goto fail;
         }