ffmpeg | branch: master | Romain Beauxis <romain.beau...@gmail.com> | Sat May 24 13:14:05 2025 -0500| [ba3d4c2ba2b85ccd35227b917c46c4eb0e8c39aa] | committer: Michael Niedermayer
libavformat/oggdec.{c, h}: Add new_extradata, use it to pass extradata to the next decoded packet. Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba3d4c2ba2b85ccd35227b917c46c4eb0e8c39aa --- libavformat/oggdec.c | 11 +++++++++++ libavformat/oggdec.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 5557eb4a14..da3ef815db 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -77,6 +77,7 @@ static void free_stream(AVFormatContext *s, int i) av_freep(&stream->private); av_freep(&stream->new_metadata); + av_freep(&stream->new_extradata); } //FIXME We could avoid some structure duplication @@ -888,6 +889,16 @@ retry: os->new_metadata_size = 0; } + if (os->new_extradata) { + ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, + os->new_extradata, os->new_extradata_size); + if (ret < 0) + return ret; + + os->new_extradata = NULL; + os->new_extradata_size = 0; + } + return psize; } diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h index bc670d0f1e..5083de646c 100644 --- a/libavformat/oggdec.h +++ b/libavformat/oggdec.h @@ -94,6 +94,8 @@ struct ogg_stream { int end_trimming; ///< set the number of packets to drop from the end uint8_t *new_metadata; size_t new_metadata_size; + uint8_t *new_extradata; + size_t new_extradata_size; void *private; }; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".