You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user