rmdec: stricter error check to avoid theoretical unitialized use

CC: libav-stable@libav.org
Bug-Id: CID 90558
nutenc: check for negative index rather than assert

CC: libav-stable@libav.org
Bug-Id: CID 703721
nutdec: check av_new_packet return value

CC: libav-stable@libav.org
Bug-Id: CID 733713
Merge commit 'be42c0b8d57fe2ea769892d102ffd5561dc18709'

* commit 'be42c0b8d57fe2ea769892d102ffd5561dc18709':
  rmdec: stricter error check to avoid theoretical unitialized use

Conflicts:
	libavformat/rmdec.c

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

* commit 'b69183f65d0f6f4cd7a4e6c0deb57d59b0185aba':
  nutenc: check for negative index rather than assert

Conflicts:
	libavformat/nutenc.c

Not merged, the assert is correct

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

* commit 'af7ca6ea124b82b337a6b96e10963e88eba57ebe':
  nutdec: check av_new_packet return value

Conflicts:
	libavformat/nutdec.c

See: bb502411ddb9fe1928d4a999693a3a49b83f8698
Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavf/cinedec: Fix a typo in the file header.
avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width

No testcase known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tools/crypto_bench: add CAST5 support

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
Support raw dvdsub palette as stored on normal dvd's

This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Check return value of avio_seek and avoid modifying state if it fails

The code still modifies state if the timestamp is not found. Not
sure exactly how to avoid that.
asf hacks
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Don't accept mpegts PMT that isn't current
Don't reparse PMT unless it's version has changed
Read PID timestamps as well as PCR timestamps to find location in mpegts stream
Get stream durations using read_timestamp
changed: allow 4 second skew between streams in mov before attempting to seek
fixed: memleak in mpegts demuxer on some malformed (??) mpegts files with too large pes packets

at-visions sample file brokenStream.mpg