oss_audio: use a macro to simplify ioctl() error checking

Also add a note about SNDCTL_DSP_GETFMTS which may fail even if OSS is
available.

CC: libav-stable@libav.org
Bug-Id: CID 1238992
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
swscale: fix sign extensions in yuv planar conversion

Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set.

yuvPlanartouyvy_c and yuvPlanartoyuy2_c are affected.

CC: libav-stable@libav.org
Bug-Id: CID 732281 / CID 732282
rtmp: Always call rtmp_close() on rtmp_open() failure

Prevent possible memory leaks.

Connect to nginx and request a non-existent resource to
trigger the issue.

CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Uwe L. Korn <uwelk@xhochy.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
avcodec/mjpegenc: add priv_class to encoders

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '530c1441fd1426b6a4bb33485ff3226e1ae0ad45'

* commit '530c1441fd1426b6a4bb33485ff3226e1ae0ad45':
  lavc: make lmax/lmin into private options of mpegvideo encoders

Conflicts:
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/snowenc: add FF_MPV_COMMON_OPTS

This fixes the ratecontrol code with snow
adding FF_MPV_COMMON_OPTS is needed as the generic rate control options
are currently in the (unrelated) MpegEncContext

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmv2enc: add priv_class

Fixes ratecontrol code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'f401792595dd7760f531e8a3bd2336e9033bd45a'

* commit 'f401792595dd7760f531e8a3bd2336e9033bd45a':
  vf_drawtext: Do not leak the mmapped textfile

Conflicts:
	libavfilter/vf_drawtext.c

See: 6956b048d8198dce5126c8942dece21cfb1a7978
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '6d96c7ea89600655b1f18a3b12f3f041fa714152'

* commit '6d96c7ea89600655b1f18a3b12f3f041fa714152':
  vf_showinfo: Forward the av_image_get_linesize error

Conflicts:
	libavfilter/vf_showinfo.c

See: 2aecfd4f209688a8365f18b351f0ecf12fe5f873
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0d989dbfc4bc5bc1d563e967449116a7a9865258'

* commit '0d989dbfc4bc5bc1d563e967449116a7a9865258':
  af_resample: check av_opt_set_dict return value

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

* commit '088eca28164c8cd3b72b0c3d3f9e3fe5ee5cb28f':
  avresample: prevent theoretical division by zero

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

* commit '963f76144897d3f7684d82ec21e51dd50ea1106e':
  avresample: Make sure the even check does not overflow

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

* commit 'b7c77912b62163b3b46ce93fe42fff3c83604c82':
  oss_audio: use a macro to simplify ioctl() error checking

Conflicts:
	libavdevice/oss_audio.c

See: 69c7aad494683953e833e8622776e3bbcc7921ed
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'fc1eda543c6ef043300612db90da5cfd972af650'

* commit 'fc1eda543c6ef043300612db90da5cfd972af650':
  swscale: fix sign extensions in yuv planar conversion

Conflicts:
	libswscale/rgb2rgb_template.c

See: a07e9d72a1d97dc6a4d57e1f7b708e54e7db83f5
See: a30972609ca39b791ce1e4e5cc6c3dd6cb9c9b12
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0034314a69e76a53534a74cceef865cfcb7b42cc'

* commit '0034314a69e76a53534a74cceef865cfcb7b42cc':
  rtmp: Always call rtmp_close() on rtmp_open() failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/nellymoserenc: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegaudiodec_template: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/libvpxenc: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: Display pixel format information as none ... if unknown instead of omitting it

This is similar to 20a5956b8daeee4cb59d6fa00ec809b02c04d7f8

The difference this change makes affects only rather few files
but looks like:
Stream #0:1: Video: mjpeg, 90k tbr, 90k tbn, 90k tbc
vs.
Stream #0:1: Video: mjpeg, none(bt470bg/unknown/unknown), 90k tbr, 90k tbn, 90k tbc

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

This allows restricting decoders to a list of needed ones for improved security

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