examples/muxing: fix av_frame_free() not called when got_packet is false

Hi list! Since my last patch (fix 2 memleaks in doc/examples/muxing.c)
I found more problems to fix.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
examples/muxing: use S16 sample_fmt for resample src regardless of codec sample_fmt

We generate S16 samples and we should allocate the right buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
examples/muxing: fix memleaks in resampler

  - do not allocate resample dst buffer when resample is off
  - free sample buffers in addition to freeing data pointer arrays

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>