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
77 77
78 av_freep(&stream->private);78 av_freep(&stream->private);
79 av_freep(&stream->new_metadata);79 av_freep(&stream->new_metadata);
80 av_freep(&stream->new_extradata);
80}81}
81 82
82//FIXME We could avoid some structure duplication83//FIXME We could avoid some structure duplication
@@ -888,6 +889,16 @@ retry: · 805 unmodified lines
888 os->new_metadata_size = 0;889 os->new_metadata_size = 0;
889 }890 }
890 891
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
891 return psize;902 return psize;
892}903}
893 904
libavformat/oggdec.h+2−0
@@ -94,6 +94,8 @@ struct ogg_stream { · 93 unmodified lines
94 int end_trimming; ///< set the number of packets to drop from the end94 int end_trimming; ///< set the number of packets to drop from the end
95 uint8_t *new_metadata;95 uint8_t *new_metadata;
96 size_t new_metadata_size;96 size_t new_metadata_size;
97 uint8_t *new_extradata;
98 size_t new_extradata_size;
97 void *private;99 void *private;
98};100};
99 101

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