proresenc_ks: use chroma sampling in autoselection

If the chroma planes aren't subsampled, automatically select
the 4:4:4:4 profile.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt: abort if -to <= -ss

Makes ffmpeg abort instead of continuing when stop_time <= start_time.

Closes ticket #4015.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/eamad: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dirac_parser: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dct: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
vf_drawtext: add missing clear of pointers after av_expr_free()

Fixes segfault when using sendcmd with drawtext.

Since LIBAVFILTER_VERSION_MAJOR 5 FF_API_DRAWTEXT_OLD_TIMELINE
evaluates to 0.

Signed-off-by: Karl Kiniger <karl.kiniger@med.ge.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegdec: sanity check bits

Fixes undefined shift
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: Don't drop both pts and dts if timestamps are invalid

In these cases, only drop dts. Because if we drop both we have no
timestamps at all for some files.

This improves playback of HLS streams from GoPro cameras.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'bd239c9a2e151c0aeeb653a571f130aae7320894'

* commit 'bd239c9a2e151c0aeeb653a571f130aae7320894':
  lavf: Don't drop both pts and dts if timestamps are invalid

Conflicts:
	libavformat/utils.c
	tests/ref/fate/vc1-ism

See: cd6851c5ef281e44af7028e08597c4dfb73d880f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/error_resilience: avoid pointer arithmetic with NULL

move the code after the existing NULL check
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>