diff options
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/concatdec.c | 1 | ||||
-rw-r--r-- | libavformat/internal.h | 9 | ||||
-rw-r--r-- | libavformat/utils.c | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 8d80e536d1..0603c6e254 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -191,6 +191,7 @@ static int copy_stream_props(AVStream *st, AVStream *source_st) avpriv_set_pts_info(st, 64, source_st->time_base.num, source_st->time_base.den); av_dict_copy(&st->metadata, source_st->metadata, 0); + ff_stream_side_data_copy(st, source_st); return 0; } diff --git a/libavformat/internal.h b/libavformat/internal.h index 92eeb82550..2ba795d669 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -842,6 +842,15 @@ int ff_stream_add_bitstream_filter(AVStream *st, const char *name, const char *a int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src); /** + * Copy side data from source to destination stream + * + * @param dst pointer to destination AVStream + * @param src pointer to source AVStream + * @return >=0 on success, AVERROR code on error + */ +int ff_stream_side_data_copy(AVStream *dst, const AVStream *src); + +/** * Wrap ffurl_move() and log if error happens. * * @param url_src source path diff --git a/libavformat/utils.c b/libavformat/utils.c index b5a4a09ae8..332ba534d2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -605,6 +605,15 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src) if (ret < 0) return ret; + ret = ff_stream_side_data_copy(dst, src); + if (ret < 0) + return ret; + + return 0; +} + +int ff_stream_side_data_copy(AVStream *dst, const AVStream *src) +{ /* Free existing side data*/ for (int i = 0; i < dst->nb_side_data; i++) av_free(dst->side_data[i].data); |