diff options
author | 赵宇龙 <zylthinking@gmail.com> | 2015-10-09 13:59:56 +0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-12 02:23:36 +0200 |
commit | 02d8abf0f576c543f2bd7d131fc876b519013f91 (patch) | |
tree | 9b0d7f76ab64e70f5459e64636699b7819a519df | |
parent | 9579550b2b868b0360131c3e042a1d385efc91c4 (diff) | |
download | ffmpeg-02d8abf0f576c543f2bd7d131fc876b519013f91.tar.gz |
h264_mp4toannexb: fix pps offfset fault 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>
(cherry picked from commit 6b32d0d86b6bec2b5cb565d6ab4556f8cd66214a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/h264_mp4toannexb_bsf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index a927bab3f8..2d447f7550 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; } } |