aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mp4toannexb_bsf.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2011-03-14 22:14:22 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2011-03-15 07:20:44 -0400
commit025225d7ee0e7585dff9617c60259febd9e7299c (patch)
treef7ea1955e8610353506d14943518b3627db4bafd /libavcodec/h264_mp4toannexb_bsf.c
parent9f8f62d4a37735ea823e82bad566a2aa69732888 (diff)
downloadffmpeg-025225d7ee0e7585dff9617c60259febd9e7299c.tar.gz
h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/h264_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/h264_mp4toannexb_bsf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index df49b34810..3754f2aee7 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -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)