cdgraphics: switch to bytestream2

Fixes possible invalid memory accesses on corrupted data.

CC:libav-stable@libav.org
Bug-ID: CVE-2013-3674
cdgraphics: do not return 0 from the decode function

0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-stable@libav.org
svq1: do not modify the input packet

The input data must remain constant, make a copy instead. This is in
theory a performance hit, but since I failed to find any samples
using this feature, this should not matter in practice.

Also, check the size of the header, avoiding invalid reads on truncated
data.

CC:libav-stable@libav.org
Merge commit 'a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812'

* commit 'a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812':
  cdgraphics: switch to bytestream2

Conflicts:
	libavcodec/cdgraphics.c

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

* commit 'c7d9b473e28238d4a4ef1b7e8b42c1cca256da36':
  cdgraphics: do not return 0 from the decode function

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

* commit '7b588bb691644e1b3c168b99accf74248a24e3cf':
  svq1: do not modify the input packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"

Add padding, clear size, use the correct pointer.

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