@@ -190,6 +190,17 @@ static int copy_stream_props(AVStream *st, AVStream *source_st)
st->sample_aspect_ratio = source_st->sample_aspect_ratio;
avpriv_set_pts_info(st, 64, source_st->time_base.num, source_st->time_base.den);
+ // copy side data
+ for (int i = 0; i < source_st->nb_side_data; i++) {
+ const AVPacketSideData *sd_src = &source_st->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);
+ }
+
av_dict_copy(&st->metadata, source_st->metadata, 0);
return 0;
}
@@ -1 +1 @@
-0ea04f40869068b282a67e5b8f2a6127 *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
+41c317ac3b57addfb93f7ac9d2db822e *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
@@ -1 +1 @@
-88abe27eddff160aafd622ed02c26eb6 *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
+d6da934b59deb2e341de15fc33b002e3 *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
@@ -121,4 +121,5 @@ Strings Metadata
video|0|37|1.480000|34|1.360000|1|0.040000|24786|212480|K_|1
Strings Metadata
0|mpeg2video|4|video|[0][0][0][0]|0x0000|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
+CPB properties|0|0|0|49152|-1
1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
@@ -79,4 +79,5 @@ Strings Metadata
audio|1|65280|1.360000|65280|1.360000|1920|0.040000|7680|2074624|K_|1
Strings Metadata
0|mpeg2video|0|video|[0][0][0][0]|0x0000|720|608|0|0|0|0|0|1:1|45:38|yuv422p|5|tv|unknown|unknown|unknown|topleft|tb|1|N/A|25/1|25/1|1/25|0|0.000000|N/A|N/A|30000000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
+CPB properties|30000000|0|0|1212416|-1
1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
@@ -213,3 +213,4 @@ video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|__MPEGTS Stre
0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0
1|mpeg2video|4|video|[2][0][0][0]|0x0002|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 1
+CPB properties|0|0|0|49152|-1
Fixes mpeg2video stream copy to mpeg muxer. Note: this is a following of 1ec86be79b11. Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> --- libavformat/concatdec.c | 11 +++++++++++ tests/ref/fate/concat-demuxer-extended-lavf-mxf | 2 +- tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 1 + tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 1 + tests/ref/fate/concat-demuxer-simple2-lavf-ts | 1 + 6 files changed, 16 insertions(+), 2 deletions(-)