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

Commit d47ea7ca authored by Satya Krishna Pindiproli's avatar Satya Krishna Pindiproli Committed by Steve Kondik
Browse files

libstagefright: Reset flac decoder eos during flush

- The CTS test case testDecodeFlac fails when the reset mode
  is RESET_MODE_EOS_FLUSH.
- In this mode, after input and output eos are set, there is a seek to 0
  but bit-stream is not fetched from the parser resulting in an
  assert that causes the CTS failure.
- Ensure that the decoder eos is reset in flushDecoder so that bit-stream
  is fetched from the parser.
- Also fix indentation issues for log messages.

CRs-Fixed: 793060
Change-Id: I5fc86a7b04f009e91231fa4b20b32da1dac6a9ca
parent 92b096d3
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@ int32_t FLACDecoder::flushDecoder(outBuffer *obuf) {
    /* Write ptr = read ptr = 0, empty buffer */
    obuf->i32WritePtr = 0;
    obuf->i32ReadPtr = 0;
    obuf->eos = 0;
    return 0;
}

@@ -412,7 +413,7 @@ status_t FLACDecoder::read(MediaBuffer **out, const ReadOptions* options) {
                break;
            }
        } else {
            ALOGE("Decoding as usual");
            ALOGV("Decoding as usual");
        }
        // End of check after decoding
    }// End of while for decoding