ttaenc: fix packet size

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit bc2187cfdb5eeb82e3caf42a81a00d1ee4c16d8e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
sgidec: safer check for buffer overflow

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 86e722ab97d7f5f0552c8a0958f7910dfcf3c5b7)

Conflicts:

	libavcodec/sgidec.c

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