idcin: fix memleaks in idcin_read_packet()

Fixes fate-id-cin-video failures when running FATE with valgrind.
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  idcin: fix memleaks in idcin_read_packet()

Conflicts:
	libavformat/idcin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mux: simplify chunking interleaver code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mux: de-obfuscate chunked interleaver checks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mux/chunked interleaver: better align duration chunks.

This code causes the chunking to tend toward more optimal
alignment between streams.
The first chunks can still be less optimal aligned