summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mp4toannexb_bsf.c
diff options
context:
space:
mode:
author赵宇龙 <zylthinking@gmail.com>2015-10-09 13:59:56 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-10 01:37:00 +0200
commitcd847839f33e58a2c2259595335ab483ef32667d (patch)
treeaf575d60f9cf1ea784c03c2ff66ca5344ad12f57 /libavcodec/h264_mp4toannexb_bsf.c
parent3d126ef188639e0b55bdbbb755eafced66f23352 (diff)
downloadffmpeg-streaming-cd847839f33e58a2c2259595335ab483ef32667d.zip
ffmpeg-streaming-cd847839f33e58a2c2259595335ab483ef32667d.tar.gz
h264_mp4toannexb: fix the pps offset when there are more than one sps in avcc
the pps offset is used to locate pps in the spspps_buf; however, the current calc method is wrong because it is the offset of the original avctx->extradata; when there is only one sps in the avcc; the value is correct by coincidence, however, it will fail in avcc with multi sps Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/h264_mp4toannexb_bsf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index a927bab..2d447f7 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -122,7 +122,7 @@ pps:
if (!unit_nb && !sps_done++) {
unit_nb = *extradata++; /* number of pps unit(s) */
if (unit_nb) {
- ctx->pps_offset = (extradata - 1) - (avctx->extradata + 4);
+ ctx->pps_offset = total_size;
pps_seen = 1;
}
}
OpenPOWER on IntegriCloud