examples/decoding_encoding: fix encoding when all frames got buffered.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>