Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10cc12c4 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

MPEG4Writer: Fix writing multiple NAL units in a video sample

start code is 4-byte long

Bug: 27596987
Change-Id: Ie54167f8f1b5b00679243a41e0203fdf4018f639
parent e4aebb03
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1179,7 +1179,7 @@ off64_t MPEG4Writer::addMultipleLengthPrefixedSamples_l(MediaBuffer *buffer) {

    while (getNextNALUnit(&data, &searchSize, &nextNalStart,
            &nextNalSize, true) == OK) {
        size_t currentNalSize = nextNalStart - currentNalStart - 3 /* strip start-code */;
        size_t currentNalSize = nextNalStart - currentNalStart - 4 /* strip start-code */;
        MediaBuffer *nalBuf = new MediaBuffer((void *)currentNalStart, currentNalSize);
        addLengthPrefixedSample_l(nalBuf);
        nalBuf->release();