hevc_mvs: prevent unitialized use

CC: libav-stable@libav.org
Bug-Id: CID 1244202
hevc_cabac: decrease CABAC_MAX_BIN

Prevents shifts with undefined behavior, as no syntax element has a valid
value greater than 1 << 31.

Bug-Id: CID 1206635
dvbsubdec: add missing break

Fix a memory leak too.

CC: libav-stable@libav.org
Bug-Id: CID 732230
dvbsubdec: improve error checking

Use av_mallocz_array instead of iterating and check the returned memory.
Check returned memory and cleanly exit in case of error during the loop.
Avoid a null pointer dereference for invalid data.

CC: libav-stable@libav.org
Bug-Id: CID 29575
dvbsubdec: move shared codepath

CC: libav-stable@libav.org
Bug-Id: CID 1238839
png_parser: fix size of chunk_lenght

Fixes the comparison against constant value 0x7fffffff.

CC: libav-stable@libav.org
Bug-Id: CID 1198260
h264_cabac: fix one fill_rectangle() indentation level

Bug-Id: CID 1087088
h264_parser: don't stop on SPS_EXT in split

Add SPS_EXT, SEI, and subset SPS to codes that are skipped during split.
These codes can come before the PPS and results in incomplete extradata.
opt: Fix the documentation mentioning av_set_string3

It is av_opt_set now.
tiff: Use av_mallocz_array

CC: libav-stable@libav.org
Merge commit '9e9be5a20c0b36dce1cae11f5f5957886231a764'

* commit '9e9be5a20c0b36dce1cae11f5f5957886231a764':
  hevc_mvs: prevent unitialized use

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

* commit 'a6defd1f5b1bffcea7aa00ff379a6602cdaf2d05':
  hevc_cabac: decrease CABAC_MAX_BIN

See: 812066835189b9bf8c71d4178019949da4171259
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '1bdd21d97528d870fbb4388e837abaf390f2f7d7'

* commit '1bdd21d97528d870fbb4388e837abaf390f2f7d7':
  dvbsubdec: add missing break

See: 8b973d4937f833d1c7a226cfb2c2bc404e8f23a7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dvbsubdec: Add return code to save_subtitle_set()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '2383323661f3b8342b2c4d356fcfe8c5d1b045f8'

* commit '2383323661f3b8342b2c4d356fcfe8c5d1b045f8':
  dvbsubdec: improve error checking

Conflicts:
	libavcodec/dvbsubdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dvbsubdec: use av_freep() for saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dvbsubdec: Fix 8bit non_mod case

Untested, i failed to find a sample which triggers this case

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffplay: signal the frame queue before closing audio

Fixed regression caused by 631ac655c00e978e19d05dab572bc1ffd6078c63 when ffplay
does not quit if the audio thread is blocked.

Signed-off-by: Marton Balint <cus@passwd.hu>
Merge commit '443502aed8b814d883825e52e91e4f018955aa66'

* commit '443502aed8b814d883825e52e91e4f018955aa66':
  dvbsubdec: move shared codepath

Conflicts:
	libavcodec/dvbsubdec.c

The merged code is ignored and the factorization redone with
the code that is in FFmpeg.

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

* commit '60b055133485891405722bc9722e2c74fc9764b8':
  png_parser: fix size of chunk_lenght

Conflicts:
	libavcodec/png_parser.c

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