movenc: ilbc needs audio_vbr set.

Without this the block_align or bitrate value is not available to the decoder

Fixes Ticket2858

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3d64845600c6486a2706b118a81805f3bf4d3db5)
swr: clean layouts before checking sanity

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6dfffe92004dfd8c79d18791f28a2b1c7e387845)
swr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output

Fixes Ticket2859

Note, testcases related to the downmix channels are welcome.
(id like to make sure this is working correctly now, as obviously it didnt
 work before ...)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c56d4dab039b352961cca298d753b04e2f2fd990)
jpeg2000: check log2_cblk dimensions

Fixes out of array access
Fixes Ticket2895

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a271a9368eaabf99e6c2046103acb33957e63b7)
avcodec/flashsv: check diff_start/height

Fixes out of array accesses
Fixes Ticket2844

Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 880c73cd76109697447fbfbaa8e5ee5683309446)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/rpza: Perform pointer advance and checks before using the pointers

Fixes out of array accesses
Fixes Ticket2850

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3819db745da2ac7fb3faacb116788c32f4753f34)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/jpeg2000dec: Check cdx/y values more carefully

Some invalid values where not handled correctly in the later pixel
format matching code.
Fixes out of array accesses
Fixes Ticket2848

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8bb11c3ca77b52e05a9ed1496a65f8a76e6e2d8f)

Conflicts:

	libavcodec/jpeg2000dec.c
jpeg2000: fix dereferencing invalid pointers

Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 912ce9dd2080c5837285a471d750fa311e09b555)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf/ftp: fix possible crash
(cherry picked from commit f3ace37a3b8c93218630a37b7df4dc195f1215a9)

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