diff mbox series

[FFmpeg-devel,v2] avcodec/h264_ps: Return error if pps has FMO parameters

Message ID 20200212233656.1498-1-andriy.gelman@gmail.com
State New
Headers show
Series [FFmpeg-devel,v2] avcodec/h264_ps: Return error if pps has FMO parameters
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andriy Gelman Feb. 12, 2020, 11:36 p.m. UTC
From: Andriy Gelman <andriy.gelman@gmail.com>

FMO is not supported and fields related to FMO are not parsed, meaning
that any fields which follow will be corrupt.
---
 libavcodec/h264_ps.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

James Almer Feb. 13, 2020, 2:34 a.m. UTC | #1
On 2/12/2020 8:36 PM, Andriy Gelman wrote:
> From: Andriy Gelman <andriy.gelman@gmail.com>
> 
> FMO is not supported and fields related to FMO are not parsed, meaning
> that any fields which follow will be corrupt.
> ---
>  libavcodec/h264_ps.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
> index d36921e47bf..708594954cb 100644
> --- a/libavcodec/h264_ps.c
> +++ b/libavcodec/h264_ps.c
> @@ -794,7 +794,9 @@ int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avct
>      pps->slice_group_count = get_ue_golomb(gb) + 1;
>      if (pps->slice_group_count > 1) {
>          pps->mb_slice_group_map_type = get_ue_golomb(gb);
> -        av_log(avctx, AV_LOG_ERROR, "FMO not supported\n");
> +        avpriv_report_missing_feature(avctx, "FMO");
> +        ret = AVERROR_PATCHWELCOME;
> +        goto fail;
>      }
>      pps->ref_count[0] = get_ue_golomb(gb) + 1;
>      pps->ref_count[1] = get_ue_golomb(gb) + 1;

Applied, thanks.
diff mbox series

Patch

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index d36921e47bf..708594954cb 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -794,7 +794,9 @@  int ff_h264_decode_picture_parameter_set(GetBitContext *gb, AVCodecContext *avct
     pps->slice_group_count = get_ue_golomb(gb) + 1;
     if (pps->slice_group_count > 1) {
         pps->mb_slice_group_map_type = get_ue_golomb(gb);
-        av_log(avctx, AV_LOG_ERROR, "FMO not supported\n");
+        avpriv_report_missing_feature(avctx, "FMO");
+        ret = AVERROR_PATCHWELCOME;
+        goto fail;
     }
     pps->ref_count[0] = get_ue_golomb(gb) + 1;
     pps->ref_count[1] = get_ue_golomb(gb) + 1;