atrac: Add missing av_cold

Signed-off-by: Diego Biurrun <diego@biurrun.de>
x86: cpu: Restore some explanatory comments removed in 7160bb7
avformat/output-example: Declare link dependency on libswscale in the Makefile
oggparsevorbis: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
cosmetics: Group .name and .long_name together in codec/format declarations
rtmpproto: Print the error code string if there's no description

On (certain streams/setups at least on) Red5, the description string
actually is present, but empty. Therefore, first try loading the
description, but if not found or empty, load the code string instead.
The code string is quite understandable in most cases anyway (like
"NetStream.Play.StreamNotFound").

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Pass the 'live' parameter in the right unit

The current magic numbers passed are values in seconds, while the
parameter itself should be passed over the wire in milliseconds.

This makes (some/all?) live streams from Red5 work correctly, that
previously returned StreamNotFound even with "-rtmp_live live". After
this commit, the default 'any' also works on these streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Clear the flv allocation size on reallocp failures

This was overlooked in d872fb0f7 since I assumed all the realloc
issues in the rtmp code was fixed already.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Move the flv header/trailer addition to append_flv_data

update_offset is also called from handle_metadata, where the
packet header sizes is already included in the size.

Previously this lead to flv_data/flv_size including 15 uninitialized
bytes at the end after each call to handle_metadata, making the
flv demuxer lose sync with the stream.

Also remove leftover copying in handle_metadata. This is a leftover
from the refactoring in 5840473. (Previously this final mempcy was
the one that copied all the packets at once, while this is done
within the loop right now.) After making sure flv_size is set to
the right size, this write was out of bounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early

If the embedded flv packets were incomplete and we aborted the
copying loop early, make sure the flv buffer is trimmed to
only contain full packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Validate the embedded flv packet size before copying

This wasn't an issue prior to 58404738, when the whole RTMP packet
was copied at once and the length of the individual embedded flv
packets only were validated by the flv demuxer.

Prior to this patch, this could lead to reads and writes out of bound.

Signed-off-by: Martin Storsjö <martin@martin.st>
x86: fdct: Only build fdct code if encoders have been enabled

fdct is only initialized if encoders are enabled.
Merge commit '6a5bfd4d49e7433f6de869ccfe682940dbca8740'

* commit '6a5bfd4d49e7433f6de869ccfe682940dbca8740':
  atrac: Add missing av_cold

See: 852241561d040e0b147b5c866fd4f288324fbe48
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '80fefbed623491b92fe59ead99225f99c0d0ca08'

* commit '80fefbed623491b92fe59ead99225f99c0d0ca08':
  x86: cpu: Restore some explanatory comments removed in 7160bb7

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

* commit '47b6cfc2a0333fb24f074d27830bf35ae5007050':
  avformat/output-example: Declare link dependency on libswscale in the Makefile

Conflicts:
	libavformat/Makefile

Changes to libavformat/Makefile are not merged as our build system for the examples
is different.

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

* commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48':
  oggparsevorbis: K&R formatting cosmetics

Conflicts:
	libavformat/oggparsevorbis.c

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

* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
	libavcodec/8svx.c
	libavcodec/alac.c
	libavcodec/cljr.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dpxenc.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/ffv1dec.c
	libavcodec/flacdec.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g726.c
	libavcodec/gif.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopencore-amr.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libspeexenc.c
	libavcodec/libvo-amrwbenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/proresdec_lgpl.c
	libavcodec/proresenc_kostya.c
	libavcodec/ra144enc.c
	libavcodec/rawdec.c
	libavcodec/rv10.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tta.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/wavpack.c
	libavcodec/xbmenc.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
cosmetics: group remaining .name and .long_name.

See b2bed9325.
Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'

* commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb':
  rtmpproto: Print the error code string if there's no description

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

* commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f':
  rtmpproto: Pass the 'live' parameter in the right unit

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