You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
libavformat/oggdec.{c, h}: Add new_extradata, use it to pass extradata to the next decoded packet.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
791a333a0e
commit
ba3d4c2ba2
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user