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>