Message ID | 1591279975-31536-2-git-send-email-mypopydev@gmail.com |
---|---|
State | Accepted |
Commit | b7f3a7c439885945af697580a0c08c0573f8885b |
Headers | show |
Series | [FFmpeg-devel,1/3] fftools/ffmpeg: cosmetics | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Thu, Jun 4, 2020 at 10:39 PM Jun Zhao <mypopydev@gmail.com> wrote: > > From: vacingfang <vacingfang@tencent.com> > > hls demuxer get the strem info form sub-stream, but missed sida > data/disposition part, e,g, missed the DOVI sida data when the > stream is Dolby Vision streams. > > Signed-off-by: vacingfang <vacingfang@tencent.com> > --- > libavformat/hls.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index 3e35d15..c9b8fb7 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -1740,6 +1740,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, > else > 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; > > return 0; > -- > 2.7.4 > Ping
> 在 2020年6月4日,22:12,Jun Zhao <mypopydev@gmail.com> 写道: > > From: vacingfang <vacingfang@tencent.com> > > hls demuxer get the strem info form sub-stream, but missed sida > data/disposition part, e,g, missed the DOVI sida data when the > stream is Dolby Vision streams. > > Signed-off-by: vacingfang <vacingfang@tencent.com> > --- > libavformat/hls.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index 3e35d15..c9b8fb7 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -1740,6 +1740,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, > else > 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; > > return 0; > -- > 2.7.4 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". LGTM Thanks Steven
On Thu, Jun 18, 2020 at 11:52:58AM +0800, mypopy@gmail.com wrote: > On Thu, Jun 4, 2020 at 10:39 PM Jun Zhao <mypopydev@gmail.com> wrote: > > > > From: vacingfang <vacingfang@tencent.com> > > PLease fix the typo in the comment message. | | | > > hls demuxer get the strem info form sub-stream, but missed sida -> stream -> from ->side > > data/disposition part, e,g, missed the DOVI sida data when the -> side > > stream is Dolby Vision streams. > > > > Signed-off-by: vacingfang <vacingfang@tencent.com> > > --- > > libavformat/hls.c | 14 ++++++++++++++ > > 1 file changed, 14 insertions(+) > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > index 3e35d15..c9b8fb7 100644 > > --- a/libavformat/hls.c > > +++ b/libavformat/hls.c > > @@ -1740,6 +1740,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, > > else > > 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; > > > > return 0; > > -- > > 2.7.4 > > > Ping > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On Thu, Jun 18, 2020 at 5:26 PM <lance.lmwang@gmail.com> wrote: > > On Thu, Jun 18, 2020 at 11:52:58AM +0800, mypopy@gmail.com wrote: > > On Thu, Jun 4, 2020 at 10:39 PM Jun Zhao <mypopydev@gmail.com> wrote: > > > > > > From: vacingfang <vacingfang@tencent.com> > > > > > PLease fix the typo in the comment message. > > | | | > > > hls demuxer get the strem info form sub-stream, but missed sida > -> stream -> from ->side > > > > data/disposition part, e,g, missed the DOVI sida data when the > -> side > Pushed with typo fix, tks > > > stream is Dolby Vision streams. > > > > > > Signed-off-by: vacingfang <vacingfang@tencent.com> > > > --- > > > libavformat/hls.c | 14 ++++++++++++++ > > > 1 file changed, 14 insertions(+) > > > > > > diff --git a/libavformat/hls.c b/libavformat/hls.c > > > index 3e35d15..c9b8fb7 100644 > > > --- a/libavformat/hls.c > > > +++ b/libavformat/hls.c > > > @@ -1740,6 +1740,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, > > > else > > > 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; > > > > > > return 0; > > > -- > > > 2.7.4 > > > > > Ping
diff --git a/libavformat/hls.c b/libavformat/hls.c index 3e35d15..c9b8fb7 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1740,6 +1740,20 @@ static int set_stream_info_from_input_stream(AVStream *st, struct playlist *pls, else 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; return 0;