[FFmpeg-devel] [PATCH] avcodec/vvcdec: decode extradata to support container formats

Nuo Mi nuomi2021 at gmail.com
Sat Jan 6 03:27:33 EET 2024


On Sat, Jan 6, 2024 at 9:25 AM Nuo Mi <nuomi2021 at gmail.com> wrote:

> For example:
> wget
> https://www.elecard.com/storage/video/NovosobornayaSquare_1920x1080.mp4
> ./ffplay NovosobornayaSquare_1920x1080.mp4
> ---
>  libavcodec/vvc/vvcdec.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/libavcodec/vvc/vvcdec.c b/libavcodec/vvc/vvcdec.c
> index 608d497cb7..54ada28124 100644
> --- a/libavcodec/vvc/vvcdec.c
> +++ b/libavcodec/vvc/vvcdec.c
> @@ -977,6 +977,12 @@ static av_cold int vvc_decode_init(AVCodecContext
> *avctx)
>      if (ret)
>          return ret;
>
> +    if (avctx->extradata_size > 0 && avctx->extradata) {
> +        ret = ff_cbs_read_extradata_from_codec(s->cbc, &s->current_frame,
> avctx);
> +        if (ret < 0)
> +            return ret;
> +    }
> +
>      s->nb_fcs = (avctx->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : delayed;
>      s->fcs = av_calloc(s->nb_fcs, sizeof(*s->fcs));
>      if (!s->fcs)
> --
> 2.25.1
>
> Depends on
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231103095720.32426-3-thomas.ff@spin-digital.com/


More information about the ffmpeg-devel mailing list