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

Commit 6c537e53 authored by James Dong's avatar James Dong Committed by Android (Google) Code Review
Browse files

Merge "Properly handle start code in H264/AVC encoder output" into kraken

parents b59fbafe c6161722
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -701,6 +701,7 @@ status_t StagefrightRecorder::reset() {
    mSampleRate    = 8000;
    mSampleRate    = 8000;
    mAudioChannels = 1;
    mAudioChannels = 1;
    mAudioBitRate  = 12200;
    mAudioBitRate  = 12200;
    mInterleaveDurationUs = 0;


    mOutputFd = -1;
    mOutputFd = -1;
    mFlags = 0;
    mFlags = 0;
+2 −2
Original line number Original line Diff line number Diff line
@@ -334,8 +334,6 @@ static void StripStartcode(MediaBuffer *buffer) {
}
}


off_t MPEG4Writer::addLengthPrefixedSample_l(MediaBuffer *buffer) {
off_t MPEG4Writer::addLengthPrefixedSample_l(MediaBuffer *buffer) {
    StripStartcode(buffer);

    off_t old_offset = mOffset;
    off_t old_offset = mOffset;


    size_t length = buffer->range_length();
    size_t length = buffer->range_length();
@@ -827,6 +825,8 @@ void MPEG4Writer::Track::threadEntry() {
            continue;
            continue;
        }
        }


        if (is_avc) StripStartcode(buffer);

        SampleInfo info;
        SampleInfo info;
        info.size = is_avc
        info.size = is_avc
#if USE_NALLEN_FOUR
#if USE_NALLEN_FOUR