Skip to content

Commit

Permalink
h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PP…
Browse files Browse the repository at this point in the history
…S units.

Signed-off-by: Philip Langdale <[email protected]>
Signed-off-by: Ronald S. Bultje <[email protected]>
  • Loading branch information
philipl authored and rbultje committed Mar 15, 2011
1 parent 9f8f62d commit 025225d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libavcodec/h264_mp4toannexb_bsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
memcpy(out+total_size-unit_size, extradata+2, unit_size);
extradata += 2+unit_size;

if (!unit_nb && !sps_done++)
if (!unit_nb && !sps_done++) {
unit_nb = *extradata++; /* number of pps unit(s) */
if (unit_nb)
pps_seen = 1;
}
}

if(out)
Expand Down

0 comments on commit 025225d

Please sign in to comment.