diff mbox

[FFmpeg-devel,v2] avcodec/cbs_av1: avoid reading trailing bits when obu type is OBU_TILE_LIST

Message ID 20191211013740.9860-1-fei.w.wang@intel.com
State New
Headers show

Commit Message

Fei Wang Dec. 11, 2019, 1:37 a.m. UTC
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
 libavcodec/cbs_av1.c | 1 +
 1 file changed, 1 insertion(+)

Comments

James Almer Dec. 11, 2019, 2:41 a.m. UTC | #1
On 12/10/2019 10:37 PM, Fei Wang wrote:
> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
> ---
>  libavcodec/cbs_av1.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
> index bbe4461130..ab006f4d11 100644
> --- a/libavcodec/cbs_av1.c
> +++ b/libavcodec/cbs_av1.c
> @@ -1039,6 +1039,7 @@ static int cbs_av1_read_unit(CodedBitstreamContext *ctx,
>  
>      if (obu->obu_size > 0 &&
>          obu->header.obu_type != AV1_OBU_TILE_GROUP &&
> +        obu->header.obu_type != AV1_OBU_TILE_LIST &&
>          obu->header.obu_type != AV1_OBU_FRAME) {
>          int nb_bits = obu->obu_size * 8 + start_pos - end_pos;

Applied, thanks.
Fei Wang Dec. 11, 2019, 7:29 a.m. UTC | #2
> -----Original Message-----

> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of

> James Almer

> Sent: Wednesday, December 11, 2019 10:41 AM

> To: ffmpeg-devel@ffmpeg.org

> Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/cbs_av1: avoid reading

> trailing bits when obu type is OBU_TILE_LIST

> 

> On 12/10/2019 10:37 PM, Fei Wang wrote:

> > Signed-off-by: Fei Wang <fei.w.wang@intel.com>

> > ---

> >  libavcodec/cbs_av1.c | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c index

> > bbe4461130..ab006f4d11 100644

> > --- a/libavcodec/cbs_av1.c

> > +++ b/libavcodec/cbs_av1.c

> > @@ -1039,6 +1039,7 @@ static int

> > cbs_av1_read_unit(CodedBitstreamContext *ctx,

> >

> >      if (obu->obu_size > 0 &&

> >          obu->header.obu_type != AV1_OBU_TILE_GROUP &&

> > +        obu->header.obu_type != AV1_OBU_TILE_LIST &&

> >          obu->header.obu_type != AV1_OBU_FRAME) {

> >          int nb_bits = obu->obu_size * 8 + start_pos - end_pos;

> 

> Applied, thanks.

Thanks James. Could you help to review my another cbs av1 patch? Thanks.
https://patchwork.ffmpeg.org/patch/16717/ 
> _______________________________________________

> 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".
diff mbox

Patch

diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index bbe4461130..ab006f4d11 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -1039,6 +1039,7 @@  static int cbs_av1_read_unit(CodedBitstreamContext *ctx,
 
     if (obu->obu_size > 0 &&
         obu->header.obu_type != AV1_OBU_TILE_GROUP &&
+        obu->header.obu_type != AV1_OBU_TILE_LIST &&
         obu->header.obu_type != AV1_OBU_FRAME) {
         int nb_bits = obu->obu_size * 8 + start_pos - end_pos;