Check if an mp3 header is using a reserved sample rate.

Fixes an invalid read past the end of avpriv_mpa_freq_tab.
Fixes divide-by-zero due to sample_rate being set to 0.

Bug-Id: 705

CC:libav-stable@libav.org
Check mp3 header before calling avpriv_mpegaudio_decode_header().

As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.

CC:libav-stable@libav.org
mpeg: Split error resilience bits off into a separate file
dsputil: Split bswap*_buf() off into a separate context
Merge commit '44127546b0a81dc9dd6190739a62d48f0044c6f3'

* commit '44127546b0a81dc9dd6190739a62d48f0044c6f3':
  Check if an mp3 header is using a reserved sample rate.

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

* commit 'f2f2e7627f0c878d13275af5d166ec5932665e28':
  Check mp3 header before calling avpriv_mpegaudio_decode_header().

Conflicts:
	libavformat/mp3enc.c

See: 2dd0da787ce5008d4d1b8f461fbd1288c32e2c38
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '7b9ef8d701c319c26f7d0664fe977e176764c74e'

* commit '7b9ef8d701c319c26f7d0664fe977e176764c74e':
  mpeg: Split error resilience bits off into a separate file

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
indeo45: use is_indeo4 context flag instead of checking codec ID

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Merge commit 'c67b449bebbe0b35c73b203683e77a0a649bc765'

* commit 'c67b449bebbe0b35c73b203683e77a0a649bc765':
  dsputil: Split bswap*_buf() off into a separate context

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/ac3dec.c
	libavcodec/ac3dec.h
	libavcodec/apedec.c
	libavcodec/eamad.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/huffyuvdec.c
	libavcodec/motionpixels.c
	libavcodec/truemotion2.c
	libavcodec/x86/Makefile
	libavcodec/x86/dsputil_init.c

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

* commit 'e121ac634ba324a318f4a97f978dcfb48da6b735':
  indeo45: use is_indeo4 context flag instead of checking codec ID

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avutil/lzo: Fix integer overflow

Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>