mathops/x86: work around inline asm miscompilation with GCC 4.8.1

The volatile is not required here, and prevents a miscompilation with GCC
4.8.1 when building on x86 with --cpu=i686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
avcodec/mjpegdec: change error return value to be outside the 16bit range

Fixes part of Ticket2965

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegdec: rgba64 ljpeg support

Fixes Ticket2965

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
riff: g723_1 decodes vivo g723.1 in asf
works on bellair_digital_movie.asf
omadec: Properly check lengths before incrementing the position

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
sierravmd: Do sanity checking of frame sizes

Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + BYTES_PER_FRAME_RECORD won't overflow.

Also factorize other existing error return paths.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
vocdec: Don't update codec parameters mid-stream

If we really want to support parameter changes, they need to be
signalled along with the AVPackets as parameter change side data,
not just changing the AVCodecContext parameters when a packet
is demuxed (since there may be other earlier packets yet undecoded).

Something similar was already done for the sample rate in 0883109b2,
but some parameters were left changeable.

This avoids having to recheck the channel count for validity for
each decoded frame in (ad)pcm decoders, unless the decoders
explicitly say that they accept parameter changes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
cavsdec: Make sure a sequence header has been decoded before decoding pictures

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
proresdec: Properly make sure an index doesn't run past the limit

If idx equaled num_coeffs - 1 on entry to the loop, the previous
check failed to break out of the loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
vp3: Check the framerate for validity

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
avpacket: Fix error checking in packet_alloc

Previously the wrong buffer pointer was checked, when buf
instead of *buf was checked. But checking the return value
instead is even better.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'a06a5b78e2c3bd2e12aff0627a3b65c6fee555a5'

* commit 'a06a5b78e2c3bd2e12aff0627a3b65c6fee555a5':
  mathops/x86: work around inline asm miscompilation with GCC 4.8.1

See: 659df32a9d8984081ccd54adc3aee7daeb33388d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '342c43d154e586bc022c86b168fe8d36f69da9d3'

* commit '342c43d154e586bc022c86b168fe8d36f69da9d3':
  omadec: Properly check lengths before incrementing the position

See: f1d6f013b2078140fb701978d720abecde7cd73f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0ef1660a6365ce60ead8858936b6f3f8ea862826'

* commit '0ef1660a6365ce60ead8858936b6f3f8ea862826':
  sierravmd: Do sanity checking of frame sizes

Conflicts:
	libavformat/sierravmd.c

See: 47c4713a23d271eedd2eb2c02daa70cb0ea4e0ac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2'

* commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2':
  vocdec: Don't update codec parameters mid-stream

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

* commit 'e90a6846c2c006fbebd00e1f2789f4a86fafacef':
  cavsdec: Make sure a sequence header has been decoded before decoding pictures

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

* commit 'ac9d159015a88aa2721b271875d18482f713f354':
  proresdec: Properly make sure an index doesn't run past the limit

Conflicts:
	libavcodec/proresdec_lgpl.c

See: 30df9789a9745d8e4b1afc10d1a983bfc8816eb9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Fix references to deleted avcodec_encode_video() function
Merge commit '6fc8226e29055858f28973bb3d27b63b3b65e616'

* commit '6fc8226e29055858f28973bb3d27b63b3b65e616':
  vp3: Check the framerate for validity

Conflicts:
	libavcodec/vp3.c

See: a56d963f111b1a192cdabb05500f8083bd77ca93
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avpacket: Fix error checking in packet_alloc

Conflicts:
	libavcodec/avpacket.c

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