Allow decoding of slightly broken Nikon avi files.

Fixes ticket #3330.
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Allow decoding of slightly broken Nikon avi files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
examples: add remuxing example

Show how to perform streamcopy from one container to another.
examples/muxing: factorize write_interleave code

Also log output packet information.
examples/muxing: change error checks, from "ret != 0" to "ret < 0"

More consistent and more future-proof.
examples/muxing: remove redundant {}