diff options
author | Gerard Sole <g.sole.ca@gmail.com> | 2021-12-15 20:00:31 +0100 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2021-12-22 12:05:41 +0100 |
commit | 18ad360648cd185b0ffbb444eedcbf5732774408 (patch) | |
tree | 169164ad073b7b6cee2785a58d920208704a1973 /libavformat/utils.c | |
parent | 2ac8bcec6374da529e08a684d587488287b8ed7f (diff) | |
download | ffmpeg-18ad360648cd185b0ffbb444eedcbf5732774408.tar.gz |
libavformat: add side_data copy in concat demuxer
Adds support for concat demuxer to copy the side data information
from the input file to the resulting file. It will behave like the
metadata copy, where the metadata of the first file is kept in the
the output file.
Extract the current code that already performs the stream side_data
copy into a separate method and reuse the method in the concat demuxer.
Signed-off-by: Gerard Sole <g.sole.ca@gmail.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); |