summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mp4toannexb_bsf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-08 12:26:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-08 12:29:30 +0200
commit9d4cb45dbea845da477f1eeba976a146ab66d9da (patch)
tree708bb86624cbeebaf36fbd7bb7c1fe1e1440ba10 /libavcodec/h264_mp4toannexb_bsf.c
parentd0df2934ca63a1d5c31602e6558f341bd738bd07 (diff)
downloadffmpeg-streaming-9d4cb45dbea845da477f1eeba976a146ab66d9da.zip
ffmpeg-streaming-9d4cb45dbea845da477f1eeba976a146ab66d9da.tar.gz
Cleanup 'Fix spurious warning when stream has SPS and PPS units.'
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/h264_mp4toannexb_bsf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index 3754f2a..e85bdb6 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -87,11 +87,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
/* retrieve sps and pps unit(s) */
unit_nb = *extradata++ & 0x1f; /* number of sps unit(s) */
if (!unit_nb) {
- unit_nb = *extradata++; /* number of pps unit(s) */
- sps_done++;
-
- if (unit_nb)
- pps_seen = 1;
+ goto pps;
} else {
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, extradata+2, unit_size);
extradata += 2+unit_size;
-
+pps:
if (!unit_nb && !sps_done++) {
unit_nb = *extradata++; /* number of pps unit(s) */
if (unit_nb)
OpenPOWER on IntegriCloud