diff mbox series

[FFmpeg-devel,v2,2/2] avcodec/av1dec: Return error for unsupported tile list OBU

Message ID 20231228012403.1284848-2-fei.w.wang@intel.com
State Accepted
Commit 57fbe929f368e65ff0bfaa3c1df5b1aa3b8b88db
Headers show
Series [FFmpeg-devel,v2,1/2] avcodec/av1dec: Move message of OBU info back to the beginning | expand

Checks

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

Commit Message

Wang, Fei W Dec. 28, 2023, 1:24 a.m. UTC
From: Fei Wang <fei.w.wang@intel.com>

Otherwise decoding maybe successful but output result is incorrect.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
 libavcodec/av1dec.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Xiang, Haihao Feb. 26, 2024, 7:05 a.m. UTC | #1
On Do, 2023-12-28 at 09:24 +0800, fei.w.wang-at-intel.com@ffmpeg.org wrote:
> From: Fei Wang <fei.w.wang@intel.com>
> 
> Otherwise decoding maybe successful but output result is incorrect.
> 
> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
> ---
>  libavcodec/av1dec.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 198fe75aa0..41746b1f11 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -1202,6 +1202,12 @@ static int av1_receive_frame_internal(AVCodecContext
> *avctx, AVFrame *frame)
>  
>          av_log(avctx, AV_LOG_DEBUG, "OBU idx:%d, type:%d, content
> available:%d.\n", i, unit->type, !!obu);
>  
> +        if (unit->type == AV1_OBU_TILE_LIST) {
> +            av_log(avctx, AV_LOG_ERROR, "Large scale tile decoding is
> unsupported.\n");
> +            ret = AVERROR_PATCHWELCOME;
> +            goto end;
> +        }
> +
>          if (!obu)
>              continue;
>  

Patchset LGTM, I'll merge them if there are no objections

Thanks
Haihao
diff mbox series

Patch

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 198fe75aa0..41746b1f11 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -1202,6 +1202,12 @@  static int av1_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
 
         av_log(avctx, AV_LOG_DEBUG, "OBU idx:%d, type:%d, content available:%d.\n", i, unit->type, !!obu);
 
+        if (unit->type == AV1_OBU_TILE_LIST) {
+            av_log(avctx, AV_LOG_ERROR, "Large scale tile decoding is unsupported.\n");
+            ret = AVERROR_PATCHWELCOME;
+            goto end;
+        }
+
         if (!obu)
             continue;