mp3enc: write full LAME frame

Most importantly, it contains the encoder delay and replaygain info.
Merge commit 'ef363ebd596da18f889a7d4845023a23dfac84c9'

* commit 'ef363ebd596da18f889a7d4845023a23dfac84c9':
  mp3enc: write full LAME frame

Conflicts:
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mp3enc: Squeeze our mp3 encoder tag into the 9byte shortname instead of randomly truncating

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/mp3dec: also accept Lavc as shortname to read delays

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/aacdec: warn user when remapping streams.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat: Add and use ff_copy_whitelists()

Fixes potential security issue in case of running out of memory

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Added support for G2M5 codec

This has also been independently found and fixed similarly by carl in
f4a3bbf4a3cd375121ea2495817f3e50e831ed48
The 2nd magic check is taken from carls implementation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/libutvideodec: Support YUV422P10

Based on ConvertToPlanar() from libutvideo
libutvideo sadly does not seem to support exporting its internal planar buffers

Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Changelog: add entry for libutvideo 422P10

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avfilter: check filter link validity

Remove now redundant check.

CC: libav-stable@libav.org
Bug-Id: CID 700371
audiointerleave: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 1087078
img2dec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 1087077
flac_picture: prevent a possible out of bound write

At "mimetype[len] = 0;" mimetype is a 64 element array and len might be
equal to or greater than that.

CC: libav-stable@libav.org
Bug-Id: CID 1061055
lavf: replace rename() with ff_rename()

The new function wraps errno so that its value is correctly reported
when other functions overwrite it (eg. in case of logging).

CC: libav-stable@libav.org
Bug-Id: CID 1135748
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
matroskadec: fix leak on error

CC: libav-stable@libav.org
Bug-Id: CID 1026767
matroskadec: check return values

CC: libav-stable@libav.org
Bug-Id: CID 733712
matroskaenc: check avio_open_dyn_buf return value

CC: libav-stable@libav.org
Bug-Id: CID 703629
mxfdec: add missing break

CC: libav-stable@libav.org
Bug-Id: CID 732232
mxfenc: Fix possible integer overflows

None of these are likely unless the user is writing a file with two billion
streams or a duration of around two months.

CC: libav-stable@libav.org
Bug-Id: CID 700568 / CID 700569 / CID 700570 /
        CID 700571 / CID 700572 / CID 700573
mov: fix assigment check

CC: libav-stable@libav.org
Bug-Id: CID 1197050