ffmpeg's CNG expects a fixed frame size, or at least a maximum frame
size, as it allocates internal buffers on construction based on that
frame size. Calling the decoder with a larger frame size therefore leads
to an internal buffer overflow. Calling it with a smaller frame size is
fine.
Retain the simple one-shot CNG for the most common case (frame size
smaller than the max). For larger frames, call the CNG in a loop and
manually construct a return frame.
Change-Id: I0ebe0b7a9ad8a08bbabd0d8dea264b08cb44feee
(cherry picked from commit dfcb9a8322)