Revision 9d4cb45d
libavcodec/h264_mp4toannexb_bsf.c | ||
---|---|---|
87 | 87 |
/* retrieve sps and pps unit(s) */ |
88 | 88 |
unit_nb = *extradata++ & 0x1f; /* number of sps unit(s) */ |
89 | 89 |
if (!unit_nb) { |
90 |
unit_nb = *extradata++; /* number of pps unit(s) */ |
|
91 |
sps_done++; |
|
92 |
|
|
93 |
if (unit_nb) |
|
94 |
pps_seen = 1; |
|
90 |
goto pps; |
|
95 | 91 |
} else { |
96 | 92 |
sps_seen = 1; |
97 | 93 |
} |
... | ... | |
115 | 111 |
memcpy(out+total_size-unit_size-4, nalu_header, 4); |
116 | 112 |
memcpy(out+total_size-unit_size, extradata+2, unit_size); |
117 | 113 |
extradata += 2+unit_size; |
118 |
|
|
114 |
pps: |
|
119 | 115 |
if (!unit_nb && !sps_done++) { |
120 | 116 |
unit_nb = *extradata++; /* number of pps unit(s) */ |
121 | 117 |
if (unit_nb) |
Also available in: Unified diff