mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Cleanup 'Fix spurious warning when stream has SPS and PPS units.'
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d0df2934ca
commit
9d4cb45dbe
@ -87,11 +87,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
/* retrieve sps and pps unit(s) */
|
/* retrieve sps and pps unit(s) */
|
||||||
unit_nb = *extradata++ & 0x1f; /* number of sps unit(s) */
|
unit_nb = *extradata++ & 0x1f; /* number of sps unit(s) */
|
||||||
if (!unit_nb) {
|
if (!unit_nb) {
|
||||||
unit_nb = *extradata++; /* number of pps unit(s) */
|
goto pps;
|
||||||
sps_done++;
|
|
||||||
|
|
||||||
if (unit_nb)
|
|
||||||
pps_seen = 1;
|
|
||||||
} else {
|
} else {
|
||||||
sps_seen = 1;
|
sps_seen = 1;
|
||||||
}
|
}
|
||||||
@ -115,7 +111,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
memcpy(out+total_size-unit_size-4, nalu_header, 4);
|
memcpy(out+total_size-unit_size-4, nalu_header, 4);
|
||||||
memcpy(out+total_size-unit_size, extradata+2, unit_size);
|
memcpy(out+total_size-unit_size, extradata+2, unit_size);
|
||||||
extradata += 2+unit_size;
|
extradata += 2+unit_size;
|
||||||
|
pps:
|
||||||
if (!unit_nb && !sps_done++) {
|
if (!unit_nb && !sps_done++) {
|
||||||
unit_nb = *extradata++; /* number of pps unit(s) */
|
unit_nb = *extradata++; /* number of pps unit(s) */
|
||||||
if (unit_nb)
|
if (unit_nb)
|
||||||
|
Loading…
Reference in New Issue
Block a user