dsicinav: K&R formatting cosmetics
dsicinav: Bound-check the source buffer when needed

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
dsicinav: Clip the source size to the expected maximum

A packet larger than cin->bitmap_size does not make sense.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Merge commit 'fcae3ff124ee97c9265e3b93f3d41238b2aee9bd'

* commit 'fcae3ff124ee97c9265e3b93f3d41238b2aee9bd':
  dsicinav: K&R formatting cosmetics

Conflicts:
	libavcodec/dsicinav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'dd0bfc3a6a310e3e3674ce7742672d689a9a0e93'

* commit 'dd0bfc3a6a310e3e3674ce7742672d689a9a0e93':
  dsicinav: Bound-check the source buffer when needed

Conflicts:
	libavcodec/dsicinav.c

See: 47f0beadba9003391d8bfef59b15aa21a5b2d293
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dsicinav: Clip the source size to the expected maximum

Clipping the compressed size based on the uncompressed size is not correct
thus this commit is not merged, and the merge is for git metadata only

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Close codec context since it is allocated by avformat_new_stream in refrence to ticket 2716

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