FLAC: resize raw decoder's buffer according to flac max buffer size

Problem:
Some flac can not be played because insufficient raw decoder's buffer
size. Raw component's input and output buffer size are both 64K.
But FLACExtractor's output(decoded pcm) buffer size may be greater
than 64K.

Solution:
FLACExtractor pass the max buffer size to ACodec and resize raw
component's input and output buffer size if possible.

Bug: 122969286
Test: play flac audio which buffer size is greater than 64K normally
Change-Id: Ic046d27926bdec35e3944aec2bd6718f197d42c1
diff --git a/media/extractors/flac/FLACExtractor.cpp b/media/extractors/flac/FLACExtractor.cpp
index 84fbcee..8854631 100644
--- a/media/extractors/flac/FLACExtractor.cpp
+++ b/media/extractors/flac/FLACExtractor.cpp
@@ -581,6 +581,7 @@
     CHECK(mGroup == NULL);
     mGroup = group;
     mMaxBufferSize = getMaxBlockSize() * getChannels() * getOutputSampleSize();
+    AMediaFormat_setInt32(mTrackMetadata, AMEDIAFORMAT_KEY_MAX_INPUT_SIZE, mMaxBufferSize);
     mGroup->add_buffer(mMaxBufferSize);
 }
 
@@ -667,7 +668,7 @@
     : mDataSource(dataSource),
       mTrackMetadata(trackMetadata),
       mOutputFloat(outputFloat),
-      mParser(new FLACParser(mDataSource, outputFloat)),
+      mParser(new FLACParser(mDataSource, outputFloat, 0, mTrackMetadata)),
       mInitCheck(mParser->initCheck()),
       mStarted(false)
 {