vorbis: return meaningful errors
h264_parser: K&R formatting cosmetics
tiff: refactor deflate support in a separate function

Report when zlib support is missing.
tiff: refactor fax support in a separate function
tiff: cleanup the error paths

Return the proper error values and optionally report them.
tiff: do not overread the source buffer

At least 2 bytes from the source are read every loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
faxcompr: K&R formatting cosmetics
faxcompr: return meaningful errors

And optionally forward them to the caller instead of concealing them.

Unify err and ret in a single variable.
avcodec/smvjpegdec: check that frames_per_jpeg cleanly divides height

Fixes out of array access

If some valid files fail this check then please open a ticket and ping me and the smvjpegdec maintainer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Do not offer smvjpeg lowres capabilities, the decoder does not support it.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/smvjpegdec: copy palette too

Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ftp: reconnect on tcp read error

This commit reconnect both connections and retries before ftp_read returns an error.
Practical use case: resume after lock screen on iOS devices.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: fix flush control connection input

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: explicit return code checks

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: abort function optimalization

It seems some ftp servers doesn't respect ABOR command,
but closing both connection is slow.

This commit keeps control connection open when possible.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: fix seeking beyond file size

adjust to ff* tools seek nature

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: probe seek capability

Make FTP streamed when server doesn't accept REST command

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
ftp: add invalid code for RETR operation

554 is possible invalid code:
- Restart not valid
- Command terminated due to server shutdown in progress
- etc...

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Merge commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1'

* commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1':
  h264_parser: K&R formatting cosmetics
  vorbis: return meaningful errors

Conflicts:
	libavcodec/h264_parser.c

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

* commit '103937681d7e6afd3e8caf8937272575e450fb55':
  tiff: refactor deflate support in a separate function

Conflicts:
	libavcodec/tiff.c

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