Skip to content

Commit dc82b2c

Browse files
committed
framecrcenc: print flags and side data elements
The new fields are only printed when they differ from their defaults this way only few fate refs change Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
1 parent 6a697b4 commit dc82b2c

File tree

12 files changed

+725
-719
lines changed

12 files changed

+725
-719
lines changed

libavformat/framecrcenc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "libavutil/adler32.h"
23+
#include "libavutil/avstring.h"
2324
#include "avformat.h"
2425
#include "internal.h"
2526

@@ -28,8 +29,13 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
2829
uint32_t crc = av_adler32_update(0, pkt->data, pkt->size);
2930
char buf[256];
3031

31-
snprintf(buf, sizeof(buf), "%d, %10"PRId64", %10"PRId64", %8d, %8d, 0x%08x\n",
32+
snprintf(buf, sizeof(buf), "%d, %10"PRId64", %10"PRId64", %8d, %8d, 0x%08x",
3233
pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
34+
if (pkt->flags != AV_PKT_FLAG_KEY)
35+
av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
36+
if (pkt->side_data_elems)
37+
av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
38+
av_strlcatf(buf, sizeof(buf), "\n");
3339
avio_write(s->pb, buf, strlen(buf));
3440
avio_flush(s->pb);
3541
return 0;

tests/ref/fate/d-cinema-demux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
0, 0, 0, 1875, 36000, 0xd592781d
33
0, 1875, 1875, 1875, 36000, 0xd592781d
44
0, 3750, 3750, 1875, 36000, 0xd592781d
5-
0, 5625, 5625, 1200, 23056, 0xde81f0d6
5+
0, 5625, 5625, 1200, 23056, 0xde81f0d6, F=0x3

tests/ref/fate/lmlm4-demux

Lines changed: 84 additions & 84 deletions
Large diffs are not rendered by default.

tests/ref/fate/mtv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@
133133
1, 104832, 104832, 1152, 418, 0xa105cdcc
134134
1, 105984, 105984, 1152, 418, 0x1477ba58
135135
1, 107136, 107136, 1152, 418, 0x8d0dcdb2
136-
0, 39, 39, 1, 3584, 0x0354c435
136+
0, 39, 39, 1, 3584, 0x0354c435, F=0x3
137137
1, 108288, 108288, 1152, 418, 0x0d7cbef4
138138
1, 109440, 109440, 1152, 294, 0x5e2b87c4

tests/ref/fate/mxf-demux

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,98 +2,98 @@
22
#tb 1: 1/25
33
0, 0, -9223372036854775808, 1, 8468, 0xc0855553
44
1, 0, 0, 50, 32000, 0x479155e6
5-
0, 1, -9223372036854775808, 1, 3814, 0xa10783b4
6-
0, 2, -9223372036854775808, 1, 3747, 0xb7bf6973
7-
0, 3, -9223372036854775808, 1, 3705, 0x5462a600
8-
0, 4, -9223372036854775808, 1, 3704, 0x1e564943
9-
0, 5, -9223372036854775808, 1, 3760, 0x10464b9a
10-
0, 6, -9223372036854775808, 1, 3799, 0xd41d6dcf
11-
0, 7, -9223372036854775808, 1, 3832, 0x5cf6999e
12-
0, 8, -9223372036854775808, 1, 3778, 0xe5fc7b9e
13-
0, 9, -9223372036854775808, 1, 38193, 0xd34e5dd4
5+
0, 1, -9223372036854775808, 1, 3814, 0xa10783b4, F=0x0
6+
0, 2, -9223372036854775808, 1, 3747, 0xb7bf6973, F=0x0
7+
0, 3, -9223372036854775808, 1, 3705, 0x5462a600, F=0x0
8+
0, 4, -9223372036854775808, 1, 3704, 0x1e564943, F=0x0
9+
0, 5, -9223372036854775808, 1, 3760, 0x10464b9a, F=0x0
10+
0, 6, -9223372036854775808, 1, 3799, 0xd41d6dcf, F=0x0
11+
0, 7, -9223372036854775808, 1, 3832, 0x5cf6999e, F=0x0
12+
0, 8, -9223372036854775808, 1, 3778, 0xe5fc7b9e, F=0x0
13+
0, 9, -9223372036854775808, 1, 38193, 0xd34e5dd4, F=0x0
1414
0, 10, -9223372036854775808, 1, 8520, 0x2a203e68
15-
0, 11, -9223372036854775808, 1, 3832, 0xe4c4b2fe
16-
0, 12, -9223372036854775808, 1, 3787, 0x0cf95fee
17-
0, 13, -9223372036854775808, 1, 3766, 0x9e019d14
18-
0, 14, -9223372036854775808, 1, 3785, 0x0ea9ae75
19-
0, 15, -9223372036854775808, 1, 3703, 0x11d349ff
20-
0, 16, -9223372036854775808, 1, 3731, 0x5cf358ef
21-
0, 17, -9223372036854775808, 1, 3785, 0x01c8962f
22-
0, 18, -9223372036854775808, 1, 3741, 0xb2c47d53
23-
0, 19, -9223372036854775808, 1, 38150, 0x08fa1f55
15+
0, 11, -9223372036854775808, 1, 3832, 0xe4c4b2fe, F=0x0
16+
0, 12, -9223372036854775808, 1, 3787, 0x0cf95fee, F=0x0
17+
0, 13, -9223372036854775808, 1, 3766, 0x9e019d14, F=0x0
18+
0, 14, -9223372036854775808, 1, 3785, 0x0ea9ae75, F=0x0
19+
0, 15, -9223372036854775808, 1, 3703, 0x11d349ff, F=0x0
20+
0, 16, -9223372036854775808, 1, 3731, 0x5cf358ef, F=0x0
21+
0, 17, -9223372036854775808, 1, 3785, 0x01c8962f, F=0x0
22+
0, 18, -9223372036854775808, 1, 3741, 0xb2c47d53, F=0x0
23+
0, 19, -9223372036854775808, 1, 38150, 0x08fa1f55, F=0x0
2424
0, 20, -9223372036854775808, 1, 8487, 0x0c234b9a
25-
0, 21, -9223372036854775808, 1, 3791, 0x831192ef
26-
0, 22, -9223372036854775808, 1, 3612, 0x598944fb
27-
0, 23, -9223372036854775808, 1, 3710, 0xccbb711a
28-
0, 24, -9223372036854775808, 1, 3864, 0x4385966e
29-
0, 25, -9223372036854775808, 1, 3919, 0x24e2abc3
30-
0, 26, -9223372036854775808, 1, 3777, 0x210c6219
31-
0, 27, -9223372036854775808, 1, 3811, 0x23bf68c2
32-
0, 28, -9223372036854775808, 1, 3802, 0x52688862
33-
0, 29, -9223372036854775808, 1, 38027, 0x3d5aa8b9
25+
0, 21, -9223372036854775808, 1, 3791, 0x831192ef, F=0x0
26+
0, 22, -9223372036854775808, 1, 3612, 0x598944fb, F=0x0
27+
0, 23, -9223372036854775808, 1, 3710, 0xccbb711a, F=0x0
28+
0, 24, -9223372036854775808, 1, 3864, 0x4385966e, F=0x0
29+
0, 25, -9223372036854775808, 1, 3919, 0x24e2abc3, F=0x0
30+
0, 26, -9223372036854775808, 1, 3777, 0x210c6219, F=0x0
31+
0, 27, -9223372036854775808, 1, 3811, 0x23bf68c2, F=0x0
32+
0, 28, -9223372036854775808, 1, 3802, 0x52688862, F=0x0
33+
0, 29, -9223372036854775808, 1, 38027, 0x3d5aa8b9, F=0x0
3434
0, 30, -9223372036854775808, 1, 8333, 0x617de950
35-
0, 31, -9223372036854775808, 1, 3831, 0x13fad8fc
36-
0, 32, -9223372036854775808, 1, 3719, 0xbc317470
37-
0, 33, -9223372036854775808, 1, 3761, 0xeac460b6
38-
0, 34, -9223372036854775808, 1, 3637, 0x27d64b32
39-
0, 35, -9223372036854775808, 1, 3666, 0xf0f700a5
40-
0, 36, -9223372036854775808, 1, 3788, 0x1c4662a8
41-
0, 37, -9223372036854775808, 1, 3960, 0xef6b9e99
42-
0, 38, -9223372036854775808, 1, 3793, 0x3a6ca832
43-
0, 39, -9223372036854775808, 1, 38312, 0xce1317cc
35+
0, 31, -9223372036854775808, 1, 3831, 0x13fad8fc, F=0x0
36+
0, 32, -9223372036854775808, 1, 3719, 0xbc317470, F=0x0
37+
0, 33, -9223372036854775808, 1, 3761, 0xeac460b6, F=0x0
38+
0, 34, -9223372036854775808, 1, 3637, 0x27d64b32, F=0x0
39+
0, 35, -9223372036854775808, 1, 3666, 0xf0f700a5, F=0x0
40+
0, 36, -9223372036854775808, 1, 3788, 0x1c4662a8, F=0x0
41+
0, 37, -9223372036854775808, 1, 3960, 0xef6b9e99, F=0x0
42+
0, 38, -9223372036854775808, 1, 3793, 0x3a6ca832, F=0x0
43+
0, 39, -9223372036854775808, 1, 38312, 0xce1317cc, F=0x0
4444
0, 40, -9223372036854775808, 1, 8548, 0x4ca944d4
45-
0, 41, -9223372036854775808, 1, 3866, 0x4e85bf0f
46-
0, 42, -9223372036854775808, 1, 3644, 0x030338e5
47-
0, 43, -9223372036854775808, 1, 3634, 0xa95f4512
48-
0, 44, -9223372036854775808, 1, 3925, 0x7583ba86
49-
0, 45, -9223372036854775808, 1, 3675, 0x979f423f
50-
0, 46, -9223372036854775808, 1, 3703, 0x11375f7a
51-
0, 47, -9223372036854775808, 1, 3705, 0xb7de5d16
52-
0, 48, -9223372036854775808, 1, 3688, 0x1db45852
53-
0, 49, -9223372036854775808, 1, 38412, 0x2ee26a63
45+
0, 41, -9223372036854775808, 1, 3866, 0x4e85bf0f, F=0x0
46+
0, 42, -9223372036854775808, 1, 3644, 0x030338e5, F=0x0
47+
0, 43, -9223372036854775808, 1, 3634, 0xa95f4512, F=0x0
48+
0, 44, -9223372036854775808, 1, 3925, 0x7583ba86, F=0x0
49+
0, 45, -9223372036854775808, 1, 3675, 0x979f423f, F=0x0
50+
0, 46, -9223372036854775808, 1, 3703, 0x11375f7a, F=0x0
51+
0, 47, -9223372036854775808, 1, 3705, 0xb7de5d16, F=0x0
52+
0, 48, -9223372036854775808, 1, 3688, 0x1db45852, F=0x0
53+
0, 49, -9223372036854775808, 1, 38412, 0x2ee26a63, F=0x0
5454
0, 50, -9223372036854775808, 1, 8385, 0x0bc20a27
5555
1, 50, 50, 50, 32000, 0x8f7e5009
56-
0, 51, -9223372036854775808, 1, 3733, 0xa3e2a9a0
57-
0, 52, -9223372036854775808, 1, 3773, 0x27769caa
58-
0, 53, -9223372036854775808, 1, 3670, 0xc8335e98
59-
0, 54, -9223372036854775808, 1, 3596, 0xd6512fb0
60-
0, 55, -9223372036854775808, 1, 3579, 0xa621fbc2
61-
0, 56, -9223372036854775808, 1, 3641, 0x2f4f46ca
62-
0, 57, -9223372036854775808, 1, 3686, 0x0a92385a
63-
0, 58, -9223372036854775808, 1, 3672, 0xe65137b9
64-
0, 59, -9223372036854775808, 1, 39065, 0xc723bf8b
56+
0, 51, -9223372036854775808, 1, 3733, 0xa3e2a9a0, F=0x0
57+
0, 52, -9223372036854775808, 1, 3773, 0x27769caa, F=0x0
58+
0, 53, -9223372036854775808, 1, 3670, 0xc8335e98, F=0x0
59+
0, 54, -9223372036854775808, 1, 3596, 0xd6512fb0, F=0x0
60+
0, 55, -9223372036854775808, 1, 3579, 0xa621fbc2, F=0x0
61+
0, 56, -9223372036854775808, 1, 3641, 0x2f4f46ca, F=0x0
62+
0, 57, -9223372036854775808, 1, 3686, 0x0a92385a, F=0x0
63+
0, 58, -9223372036854775808, 1, 3672, 0xe65137b9, F=0x0
64+
0, 59, -9223372036854775808, 1, 39065, 0xc723bf8b, F=0x0
6565
0, 60, -9223372036854775808, 1, 8611, 0x5d177f40
66-
0, 61, -9223372036854775808, 1, 3758, 0x33d59966
67-
0, 62, -9223372036854775808, 1, 3674, 0x54f37902
68-
0, 63, -9223372036854775808, 1, 3615, 0xa0f045fa
69-
0, 64, -9223372036854775808, 1, 3719, 0x41cf93ff
70-
0, 65, -9223372036854775808, 1, 3757, 0x3a1b7e8f
71-
0, 66, -9223372036854775808, 1, 3762, 0xe7f9714d
72-
0, 67, -9223372036854775808, 1, 3738, 0x8121805b
73-
0, 68, -9223372036854775808, 1, 3733, 0x13e262db
74-
0, 69, -9223372036854775808, 1, 38433, 0x3d58c500
66+
0, 61, -9223372036854775808, 1, 3758, 0x33d59966, F=0x0
67+
0, 62, -9223372036854775808, 1, 3674, 0x54f37902, F=0x0
68+
0, 63, -9223372036854775808, 1, 3615, 0xa0f045fa, F=0x0
69+
0, 64, -9223372036854775808, 1, 3719, 0x41cf93ff, F=0x0
70+
0, 65, -9223372036854775808, 1, 3757, 0x3a1b7e8f, F=0x0
71+
0, 66, -9223372036854775808, 1, 3762, 0xe7f9714d, F=0x0
72+
0, 67, -9223372036854775808, 1, 3738, 0x8121805b, F=0x0
73+
0, 68, -9223372036854775808, 1, 3733, 0x13e262db, F=0x0
74+
0, 69, -9223372036854775808, 1, 38433, 0x3d58c500, F=0x0
7575
0, 70, -9223372036854775808, 1, 8410, 0xa4f7fd2e
76-
0, 71, -9223372036854775808, 1, 3711, 0x0e112d3c
77-
0, 72, -9223372036854775808, 1, 3692, 0xb46574b2
78-
0, 73, -9223372036854775808, 1, 3563, 0xad43343d
79-
0, 74, -9223372036854775808, 1, 3613, 0x5cd85c4f
80-
0, 75, -9223372036854775808, 1, 3653, 0xe15a2853
81-
0, 76, -9223372036854775808, 1, 3684, 0x9ddd58cb
82-
0, 77, -9223372036854775808, 1, 3256, 0xd7f89f2e
83-
0, 78, -9223372036854775808, 1, 3698, 0x2b82624a
84-
0, 79, -9223372036854775808, 1, 39520, 0xd3f2b7c5
76+
0, 71, -9223372036854775808, 1, 3711, 0x0e112d3c, F=0x0
77+
0, 72, -9223372036854775808, 1, 3692, 0xb46574b2, F=0x0
78+
0, 73, -9223372036854775808, 1, 3563, 0xad43343d, F=0x0
79+
0, 74, -9223372036854775808, 1, 3613, 0x5cd85c4f, F=0x0
80+
0, 75, -9223372036854775808, 1, 3653, 0xe15a2853, F=0x0
81+
0, 76, -9223372036854775808, 1, 3684, 0x9ddd58cb, F=0x0
82+
0, 77, -9223372036854775808, 1, 3256, 0xd7f89f2e, F=0x0
83+
0, 78, -9223372036854775808, 1, 3698, 0x2b82624a, F=0x0
84+
0, 79, -9223372036854775808, 1, 39520, 0xd3f2b7c5, F=0x0
8585
0, 80, -9223372036854775808, 1, 8493, 0x163559be
86-
0, 81, -9223372036854775808, 1, 3719, 0x6fa0916f
87-
0, 82, -9223372036854775808, 1, 3655, 0xa9233de1
88-
0, 83, -9223372036854775808, 1, 3684, 0xa6125737
89-
0, 84, -9223372036854775808, 1, 3688, 0xa9da6686
90-
0, 85, -9223372036854775808, 1, 3685, 0x674d634e
91-
0, 86, -9223372036854775808, 1, 3677, 0x7a85535d
92-
0, 87, -9223372036854775808, 1, 3666, 0xce3600a2
93-
0, 88, -9223372036854775808, 1, 3837, 0x3a7090e1
94-
0, 89, -9223372036854775808, 1, 38696, 0x12c59cd2
86+
0, 81, -9223372036854775808, 1, 3719, 0x6fa0916f, F=0x0
87+
0, 82, -9223372036854775808, 1, 3655, 0xa9233de1, F=0x0
88+
0, 83, -9223372036854775808, 1, 3684, 0xa6125737, F=0x0
89+
0, 84, -9223372036854775808, 1, 3688, 0xa9da6686, F=0x0
90+
0, 85, -9223372036854775808, 1, 3685, 0x674d634e, F=0x0
91+
0, 86, -9223372036854775808, 1, 3677, 0x7a85535d, F=0x0
92+
0, 87, -9223372036854775808, 1, 3666, 0xce3600a2, F=0x0
93+
0, 88, -9223372036854775808, 1, 3837, 0x3a7090e1, F=0x0
94+
0, 89, -9223372036854775808, 1, 38696, 0x12c59cd2, F=0x0
9595
0, 90, -9223372036854775808, 1, 8022, 0xd343433f
96-
0, 91, -9223372036854775808, 1, 5157, 0x440c14e5
97-
0, 92, -9223372036854775808, 1, 5003, 0xf8e1daff
98-
0, 93, -9223372036854775808, 1, 4954, 0x89866344
99-
0, 94, -9223372036854775808, 1, 53664, 0xeb0c4c42
96+
0, 91, -9223372036854775808, 1, 5157, 0x440c14e5, F=0x0
97+
0, 92, -9223372036854775808, 1, 5003, 0xf8e1daff, F=0x0
98+
0, 93, -9223372036854775808, 1, 4954, 0x89866344, F=0x0
99+
0, 94, -9223372036854775808, 1, 53664, 0xeb0c4c42, F=0x0

0 commit comments

Comments
 (0)