mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/flvdec: Avoid duplicating extradata when adding side-data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
6c70f89813
commit
ed9bbcff6f
@ -1283,12 +1283,11 @@ retry_duration:
|
|||||||
pkt->stream_index = st->index;
|
pkt->stream_index = st->index;
|
||||||
pkt->pos = pos;
|
pkt->pos = pos;
|
||||||
if (flv->new_extradata[stream_type]) {
|
if (flv->new_extradata[stream_type]) {
|
||||||
uint8_t *side = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
|
int ret = av_packet_add_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
|
||||||
flv->new_extradata_size[stream_type]);
|
flv->new_extradata[stream_type],
|
||||||
if (side) {
|
flv->new_extradata_size[stream_type]);
|
||||||
memcpy(side, flv->new_extradata[stream_type],
|
if (ret >= 0) {
|
||||||
flv->new_extradata_size[stream_type]);
|
flv->new_extradata[stream_type] = NULL;
|
||||||
av_freep(&flv->new_extradata[stream_type]);
|
|
||||||
flv->new_extradata_size[stream_type] = 0;
|
flv->new_extradata_size[stream_type] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user