vf_drawtext: Do not leak the mmapped textfile

And validate its size while at it.

CC: libav-stable@libav.org
Bug-Id: CID 1244189
vf_showinfo: Forward the av_image_get_linesize error

CC: libav-stable@libav.org
Bug-Id: CID 1087086
af_resample: check av_opt_set_dict return value

CC: libav-stable@libav.org
Bug-Id: CID 1087076
avresample: prevent theoretical division by zero

CC: libav-stable@libav.org
Bug-Id: CID 1231986
avresample: Make sure the even check does not overflow

CC: libav-stable@libav.org
Bug-Id: CID 732225
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>
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>