vda: fix crash when a frame is dropped.

Signed-off-by: Sebastien Zwickert <dilaroga@gmail.com>
avcodec/takdec: always check bits_per_raw_sample

Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegdec: use the correct linesize in the flipping code

Fixes out of array access
No releases should be affected
Depends on 7c3700cd1d8683966b21fffbf02e326d0bd14e06, do not backport without this one

Fixes: asan_heap-oob_14a37fe_9111_cov_1692584941_test4.amv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Auto-detect hevc in mpeg-ts.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are not supported

This case could occur when cuting and concatenating bitstreams

Fixes out of array read
Fixes: asan_heap-oob_1b33fdd_2849_cov_478905890_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1dec: Print warning for frame pictures with direct mode MBs, followed by field pictures

This case is not implemented
No non fuzzed samples are known to use this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mxf: Handle negative edit_rate

Default to 1/25.
mxf: Read field dominance flag

And export the information in field_order.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
hevc: Consider first quantization group any reference to 0, 0

According to my understanding of T-REC-H.265-2013044 chapter 8.6.1.

Sample-Id: 00001438-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
hevc: Reject impossible slice segment

A dependent slice cannot have address 0.
Prevent an out of array bound load in ff_hevc_cabac_init().

Sample-Id: 00001406-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
avcodec/vc1: factor read_bfraction() out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1: Check bfraction_lut_index

Fixes: out of array read
Fixes: asan_static-oob_1b40507_2849_SA10143.vc1
Fixes: asan_static-oob_1b40a15_2849_cov_1182297305_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_2159513432_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_3230311510_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vc1: reset fcm/field_mode in non advanced header parsing

Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
RoQ decoder: Remove misleading diagnostics.

It is not necessarily an error when a chunk does not cover a whole block.
Messages did not reflect the actual situation either.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
RoQ-encoder: introducing Quake 3 compatibility option

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avdevice/v4l2: only use frame period from v4l2 if valid

There is evidence that some drivers do not set a valid value

See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718805
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avdevice/v4l2: only use average frame rate if set

It might be unset on some platforms with some drivers and some input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavd/opengl_enc_shaders: make shaders code static and const

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
lavd/opengl_enc: create format description table

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
avcodec/tiff: reset geotag_count in free_geotags()

Fixes null pointer dereference
Fixes: signal_sigsegv_19d922e_3688_cov_1577641655_aletrek_tiff.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>