History

fftools/ffmpeg: stop injecting stream side data in packets

This is no longer needed as the side data is available for decoders in the AVCodecContext. The tests affected reflect the removal of useless CPB and Stereo 3D side data in packets.

James Almer committed 3 years ago

Commit d372c2f1 parent ae2227115 files · +21 −43Browse files

Unified · Split

15 files
  1. fftools/ffmpeg_demux.c +0 −22
  2. tests/ref/fate/autorotate +2 −2
  3. tests/ref/fate/copy-trac3074 +1 −1
  4. tests/ref/fate/matroska-avoid-negative-ts +1 −1
  5. tests/ref/fate/matroska-dovi-write-config7 +1 −1
  6. tests/ref/fate/matroska-dovi-write-config8 +1 −1
  7. tests/ref/fate/matroska-encoding-delay +1 −1
  8. tests/ref/fate/matroska-mastering-display-metadata +2 −2
  9. tests/ref/fate/matroska-spherical-mono-remux +2 −2
  10. tests/ref/fate/matroska-stereo_mode +4 −4
  11. tests/ref/fate/matroska-vp8-alpha-remux +1 −1
  12. tests/ref/fate/mov-mp4-disposition-mpegts-remux +2 −2
  13. tests/ref/fate/mxf-d10-user-comments +1 −1
  14. tests/ref/fate/mxf-remux-applehdr10 +1 −1
  15. tests/ref/fate/vp9-superframe-bsf +1 −1
fftools/ffmpeg_demux.c+0−22
@@ -480,28 +480,6 @@ static int input_packet_process(Demuxer *d, DemuxMsg *msg, AVPacket *src) · 479 unmodified lines
480 ds->data_size += pkt->size;480 ds->data_size += pkt->size;
481 ds->nb_packets++;481 ds->nb_packets++;
482 482
483 /* add the stream-global side data to the first packet */
484 if (ds->nb_packets == 1) {
485 for (int i = 0; i < ist->st->codecpar->nb_coded_side_data; i++) {
486 AVPacketSideData *src_sd = &ist->st->codecpar->coded_side_data[i];
487 uint8_t *dst_data;
488
489 if (src_sd->type == AV_PKT_DATA_DISPLAYMATRIX)
490 continue;
491
492 if (av_packet_get_side_data(pkt, src_sd->type, NULL))
493 continue;
494
495 dst_data = av_packet_new_side_data(pkt, src_sd->type, src_sd->size);
496 if (!dst_data) {
497 ret = AVERROR(ENOMEM);
498 goto fail;
499 }
500
501 memcpy(dst_data, src_sd->data, src_sd->size);
502 }
503 }
504
505 if (debug_ts) {483 if (debug_ts) {
506 av_log(NULL, AV_LOG_INFO, "demuxer+ffmpeg -> ist_index:%d:%d type:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s off:%s off_time:%s\n",484 av_log(NULL, AV_LOG_INFO, "demuxer+ffmpeg -> ist_index:%d:%d type:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s off:%s off_time:%s\n",
507 f->index, pkt->stream_index,485 f->index, pkt->stream_index,
tests/ref/fate/autorotate+2−2
@@ -11,8 +11,8 @@ · 10 unmodified lines
11#codec_id 1: ac311#codec_id 1: ac3
12#sample_rate 1: 4410012#sample_rate 1: 44100
13#channel_layout_name 1: mono13#channel_layout_name 1: mono
140, -512, 0, 512, 6997, 0x55c700f6, S=1, 40140, -512, 0, 512, 6997, 0x55c700f6
151, -256, -256, 1536, 416, 0x92ddc529, S=2, 10, 4151, -256, -256, 1536, 416, 0x92ddc529, S=1, 10
160, 0, 512, 512, 4847, 0xe74f522e, F=0x0160, 0, 512, 512, 4847, 0xe74f522e, F=0x0
171, 1280, 1280, 1536, 418, 0x0a7fcd2d171, 1280, 1280, 1536, 418, 0x0a7fcd2d
180, 512, 1024, 512, 5281, 0xbd4a5dac, F=0x0180, 512, 1024, 512, 5281, 0xbd4a5dac, F=0x0
tests/ref/fate/copy-trac3074+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5#codec_id 0: eac35#codec_id 0: eac3
6#sample_rate 0: 480006#sample_rate 0: 48000
7#channel_layout_name 0: stereo7#channel_layout_name 0: stereo
80, 0, 0, 1536, 512, 0x2beaf79f, S=1, 480, 0, 0, 1536, 512, 0x2beaf79f
90, 1536, 1536, 1536, 512, 0x29ddf9d690, 1536, 1536, 1536, 512, 0x29ddf9d6
100, 3072, 3072, 1536, 512, 0xba0afa79100, 3072, 3072, 1536, 512, 0xba0afa79
110, 4608, 4608, 1536, 512, 0xe019f394110, 4608, 4608, 1536, 512, 0xe019f394
tests/ref/fate/matroska-avoid-negative-ts+1−1
@@ -11,7 +11,7 @@ fb4e7a969ef65f61c4c45d5976188aa2 *tests/data/fate/matroska-avoid-negative-ts.mat · 10 unmodified lines
11#codec_id 1: mp311#codec_id 1: mp3
12#sample_rate 1: 4410012#sample_rate 1: 44100
13#channel_layout_name 1: mono13#channel_layout_name 1: mono
140, -37, 43, 40, 9156, 0xe5bd034a, S=1, 40140, -37, 43, 40, 9156, 0xe5bd034a
151, 0, 0, 26, 417, 0x7198c15e151, 0, 0, 26, 417, 0x7198c15e
160, 3, 3, 40, 1740, 0x29ac4480, F=0x0160, 3, 3, 40, 1740, 0x29ac4480, F=0x0
171, 26, 26, 26, 417, 0x3c67c32d171, 26, 26, 26, 417, 0x3c67c32d
tests/ref/fate/matroska-dovi-write-config7+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
13#dimensions 1: 1920x108013#dimensions 1: 1920x1080
14#sar 1: 0/114#sar 1: 0/1
150, -83, 0, 41, 699, 0x728548f1150, -83, 0, 41, 699, 0x728548f1
161, -83, 0, 41, 1085, 0xfb2dba82, S=1, 8161, -83, 0, 41, 1085, 0xfb2dba82
170, -42, 167, 41, 95, 0xc0312044, F=0x0170, -42, 167, 41, 95, 0xc0312044, F=0x0
181, -42, 167, 41, 481, 0xf23f91d5, F=0x0181, -42, 167, 41, 481, 0xf23f91d5, F=0x0
190, 0, 83, 41, 99, 0x5e0a2221, F=0x0190, 0, 83, 41, 99, 0x5e0a2221, F=0x0
tests/ref/fate/matroska-dovi-write-config8+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
12#codec_id 1: aac12#codec_id 1: aac
13#sample_rate 1: 4410013#sample_rate 1: 44100
14#channel_layout_name 1: stereo14#channel_layout_name 1: stereo
150, -67, 0, 33, 63375, 0xc76606ab, S=1, 8150, -67, 0, 33, 63375, 0xc76606ab
160, -34, 133, 33, 46706, 0x0e08a7e5, F=0x0160, -34, 133, 33, 46706, 0x0e08a7e5, F=0x0
170, 0, 67, 33, 29766, 0x753c031a, F=0x0170, 0, 67, 33, 29766, 0x753c031a, F=0x0
181, 0, 0, 23, 6, 0x031e0108181, 0, 0, 23, 6, 0x031e0108
tests/ref/fate/matroska-encoding-delay+1−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
12#sample_rate 1: 4800012#sample_rate 1: 48000
13#channel_layout_name 1: stereo13#channel_layout_name 1: stereo
141, -10, -10, 24, 1152, 0x724077b8141, -10, -10, 24, 1152, 0x724077b8
150, 0, 0, 40, 237628, 0xeff25579, S=1, 40150, 0, 0, 40, 237628, 0xeff25579
161, 14, 14, 24, 1152, 0x80625572161, 14, 14, 24, 1152, 0x80625572
171, 38, 38, 24, 1152, 0x7d7f4dce171, 38, 38, 24, 1152, 0x7d7f4dce
180, 40, 40, 40, 238066, 0xb2265f41180, 40, 40, 40, 238066, 0xb2265f41
tests/ref/fate/matroska-mastering-display-metadata+2−2
@@ -22,9 +22,9 @@ · 21 unmodified lines
22#codec_id 3: ffv122#codec_id 3: ffv1
23#dimensions 3: 1280x72023#dimensions 3: 1280x720
24#sar 3: 1/124#sar 3: 1/1
250, 0, 0, 16, 57008, 0x43416399, S=2, 8, 88250, 0, 0, 16, 57008, 0x43416399
261, 0, 0, 16, 2403, 0xaa818522261, 0, 0, 16, 2403, 0xaa818522
273, 0, 0, 16, 274117, 0xc439610f, S=2, 8, 88273, 0, 0, 16, 274117, 0xc439610f
280, 17, 17, 16, 57248, 0xa06cd7b5280, 17, 17, 16, 57248, 0xa06cd7b5
291, 17, 17, 16, 2403, 0xe1a991e5291, 17, 17, 16, 2403, 0xe1a991e5
302, 17, 17, 16, 1602, 0x5d868171302, 17, 17, 16, 1602, 0x5d868171
tests/ref/fate/matroska-spherical-mono-remux+2−2
@@ -12,8 +12,8 @@ fddfea5f05a7a9a0d187df9a72900055 *tests/data/fate/matroska-spherical-mono-remux. · 11 unmodified lines
12#codec_id 1: h26412#codec_id 1: h264
13#dimensions 1: 1920x108013#dimensions 1: 1920x1080
14#sar 1: 0/114#sar 1: 0/1
150, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36150, -80, 0, 40, 69118, 0x73cb52f0
161, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36161, -80, 0, 40, 69118, 0x73cb52f0
170, -40, 160, 40, 1103, 0x082a059f, F=0x0170, -40, 160, 40, 1103, 0x082a059f, F=0x0
181, -40, 160, 40, 1103, 0x082a059f, F=0x0181, -40, 160, 40, 1103, 0x082a059f, F=0x0
19[STREAM]19[STREAM]
tests/ref/fate/matroska-stereo_mode+4−4
@@ -43,10 +43,10 @@ a7a220a77001e81685ec807ce5ac3bc6 *tests/data/fate/matroska-stereo_mode.matroska · 42 unmodified lines
43#dimensions 6: 512x51243#dimensions 6: 512x512
44#sar 6: 2/144#sar 6: 2/1
450, 0, 0, 1000, 206173, 0x95af7455450, 0, 0, 1000, 206173, 0x95af7455
461, 0, 0, 1000, 206173, 0x95af7455, S=1, 12461, 0, 0, 1000, 206173, 0x95af7455
472, 0, 0, 1000, 206173, 0x95af7455, S=1, 12472, 0, 0, 1000, 206173, 0x95af7455
483, 0, 0, 1000, 206173, 0x95af7455, S=1, 12483, 0, 0, 1000, 206173, 0x95af7455
494, 0, 0, 1000, 206173, 0x95af7455, S=1, 12494, 0, 0, 1000, 206173, 0x95af7455
505, 0, 0, 1000, 206173, 0x95af7455505, 0, 0, 1000, 206173, 0x95af7455
516, 0, 0, 1000, 206173, 0x95af7455516, 0, 0, 1000, 206173, 0x95af7455
520, 1000, 1000, 1000, 36, 0x34891010, F=0x0520, 1000, 1000, 1000, 36, 0x34891010, F=0x0
tests/ref/fate/matroska-vp8-alpha-remux+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
5#codec_id 0: vp85#codec_id 0: vp8
6#dimensions 0: 320x2136#dimensions 0: 320x213
7#sar 0: 1/17#sar 0: 1/1
80, 0, 0, 33, 2108, 0x59b92a34, S=2, 1900, 1280, 0, 0, 33, 2108, 0x59b92a34, S=1, 1900
90, 32, 32, 33, 142, 0x2f2a3fed, F=0x0, S=1, 16090, 32, 32, 33, 142, 0x2f2a3fed, F=0x0, S=1, 160
100, 65, 65, 33, 157, 0x17804767, F=0x0, S=1, 209100, 65, 65, 33, 157, 0x17804767, F=0x0, S=1, 209
110, 99, 99, 33, 206, 0x537262ca, F=0x0, S=1, 317110, 99, 99, 33, 206, 0x537262ca, F=0x0, S=1, 317
tests/ref/fate/mov-mp4-disposition-mpegts-remux+2−2
@@ -10,9 +10,9 @@ adb3b95c07a5f3e0c86641dd62f01dae *tests/data/fate/mov-mp4-disposition-mpegts-rem · 9 unmodified lines
10#codec_id 1: ac310#codec_id 1: ac3
11#sample_rate 1: 4800011#sample_rate 1: 48000
12#channel_layout_name 1: stereo12#channel_layout_name 1: stereo
131, 0, 0, 1536, 768, 0xa63778d4, S=1, 4131, 0, 0, 1536, 768, 0xa63778d4
141, 1536, 1536, 1536, 768, 0x7d577f3f141, 1536, 1536, 1536, 768, 0x7d577f3f
150, 3072, 3072, 1536, 768, 0xc2867884, S=1, 4150, 3072, 3072, 1536, 768, 0xc2867884
161, 3072, 3072, 1536, 768, 0xd86b7c8f161, 3072, 3072, 1536, 768, 0xd86b7c8f
170, 4608, 4608, 1536, 690, 0xa2714bf3170, 4608, 4608, 1536, 690, 0xa2714bf3
181, 4608, 4608, 1536, 626, 0x09f4382f181, 4608, 4608, 1536, 626, 0x09f4382f
tests/ref/fate/mxf-d10-user-comments+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
6#codec_id 0: mpeg2video6#codec_id 0: mpeg2video
7#dimensions 0: 1280x7207#dimensions 0: 1280x720
8#sar 0: 3/48#sar 0: 3/4
90, -1, 0, 1, 150000, 0x0547870d, S=1, 4090, -1, 0, 1, 150000, 0x0547870d
100, 0, 1, 1, 150000, 0xe80a1612, F=0x0100, 0, 1, 1, 150000, 0xe80a1612, F=0x0
110, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0110, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0
120, 2, 3, 1, 150000, 0x51e28a04, F=0x0120, 2, 3, 1, 150000, 0x51e28a04, F=0x0
tests/ref/fate/mxf-remux-applehdr10+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
10#codec_id 1: pcm_s24le10#codec_id 1: pcm_s24le
11#sample_rate 1: 4800011#sample_rate 1: 48000
12#channel_layout_name 1: mono12#channel_layout_name 1: mono
130, 0, 0, 1, 57008, 0x43416399, S=1, 88130, 0, 0, 1, 57008, 0x43416399
141, 0, 0, 801, 2403, 0x00000000141, 0, 0, 801, 2403, 0x00000000
150, 1, 1, 1, 57248, 0xa06cd7b5150, 1, 1, 1, 57248, 0xa06cd7b5
161, 801, 801, 801, 2403, 0x00000000161, 801, 801, 801, 2403, 0x00000000
tests/ref/fate/vp9-superframe-bsf+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3#codec_id 0: vp93#codec_id 0: vp9
4#dimensions 0: 352x2884#dimensions 0: 352x288
5#sar 0: 1/15#sar 0: 1/1
60, 0, 0, 33, 6958, 0x38e58ee6, S=1, 1260, 0, 0, 33, 6958, 0x38e58ee6
70, 33, 33, 33, 852, 0x3edf9ed0, F=0x070, 33, 33, 33, 852, 0x3edf9ed0, F=0x0
80, 66, 66, 33, 27, 0x62d007e5, F=0x080, 66, 66, 33, 27, 0x62d007e5, F=0x0
90, 100, 100, 33, 25, 0x51980749, F=0x090, 100, 100, 33, 25, 0x51980749, F=0x0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t