History

libavformat/oggdec.{c, h}: Add new_extradata, use it to pass extradata to the next decoded packet.

Romain Beauxis committed 1 year ago

Commit ba3d4c21 parent 791a3332 files · +13 −0Browse files

Unified · Split

2 files
  1. libavformat/oggdec.c +11 −0
  2. libavformat/oggdec.h +2 −0
libavformat/oggdec.c+11−0
@@ -77,6 +77,7 @@ static void free_stream(AVFormatContext *s, int i) · 76 unmodified lines
7777
7878 av_freep(&stream->private);
7979 av_freep(&stream->new_metadata);
80+ av_freep(&stream->new_extradata);
8081 }
8182
8283 //FIXME We could avoid some structure duplication
@@ -888,6 +889,16 @@ retry: · 805 unmodified lines
888889 os->new_metadata_size = 0;
889890 }
890891
892+ if (os->new_extradata) {
893+ ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
894+ os->new_extradata, os->new_extradata_size);
895+ if (ret < 0)
896+ return ret;
897+
898+ os->new_extradata = NULL;
899+ os->new_extradata_size = 0;
900+ }
901+
891902 return psize;
892903 }
893904
libavformat/oggdec.h+2−0
@@ -94,6 +94,8 @@ struct ogg_stream { · 93 unmodified lines
9494 int end_trimming; ///< set the number of packets to drop from the end
9595 uint8_t *new_metadata;
9696 size_t new_metadata_size;
97+ uint8_t *new_extradata;
98+ size_t new_extradata_size;
9799 void *private;
98100 };
99101

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t