[FFmpeg-devel] [PATCH] mpeg12dec: don't assert on unknown chroma format

Paul B Mahol onemda at gmail.com
Wed Sep 30 12:49:03 CEST 2015


On 9/30/15, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> The chroma format can be still unset in postinit when a badly cut stream
> starts with a slice instead of a sequence header. This is a common
> occurance when feeding avcodec from a Live TV stream.
> ---
>  libavcodec/mpeg12dec.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
> index 5d916d1..b3c2c45 100644
> --- a/libavcodec/mpeg12dec.c
> +++ b/libavcodec/mpeg12dec.c
> @@ -1389,7 +1389,6 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
>              case 1: avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
> break;
>              case 2:
>              case 3: avctx->chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
> break;
> -            default: av_assert0(0);
>              }
>          } // MPEG-2
>
> --
> 2.5.3.windows.1

There could be warning of some sort, lgtm anyway.


More information about the ffmpeg-devel mailing list