Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nuo Mi <nuomi2021@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Nuo Mi <nuomi2021@gmail.com>
Subject: [FFmpeg-devel] [PATCH] avcodec/vvcdec: decode extradata to support container formats
Date: Sat,  6 Jan 2024 09:24:26 +0800
Message-ID: <TYSPR06MB6433C2F40320F41A06FFEBC0AA652@TYSPR06MB6433.apcprd06.prod.outlook.com> (raw)

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

_______________________________________________
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".

             reply	other threads:[~2024-01-06  1:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06  1:24 Nuo Mi [this message]
2024-01-06  1:27 ` Nuo Mi
2024-01-06  1:31   ` James Almer
2024-01-06  2:10     ` Nuo Mi
2024-01-07  1:12       ` Nuo Mi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TYSPR06MB6433C2F40320F41A06FFEBC0AA652@TYSPR06MB6433.apcprd06.prod.outlook.com \
    --to=nuomi2021@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git