You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavf/hls: Add missed side data/disposition
hls demuxer get the stream info from sub-stream, but missed side data/disposition part, e,g, missed the DOVI side data when the stream is Dolby Vision streams. Reviewed-by <liuqi05@kuaishou.com> Signed-off-by: vacingfang <vacingfang@tencent.com>
This commit is contained in:
@@ -1768,6 +1768,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls,
|
|||||||
else
|
else
|
||||||
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
|
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
|
||||||
|
|
||||||
|
// copy disposition
|
||||||
|
st->disposition = ist->disposition;
|
||||||
|
|
||||||
|
// copy side data
|
||||||
|
for (int i = 0; i < ist->nb_side_data; i++) {
|
||||||
|
const AVPacketSideData *sd_src = &ist->side_data[i];
|
||||||
|
uint8_t *dst_data;
|
||||||
|
|
||||||
|
dst_data = av_stream_new_side_data(st, sd_src->type, sd_src->size);
|
||||||
|
if (!dst_data)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
memcpy(dst_data, sd_src->data, sd_src->size);
|
||||||
|
}
|
||||||
|
|
||||||
st->internal->need_context_update = 1;
|
st->internal->need_context_update = 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user