mpegts: pass MpegTSContext ptr explicitly

AVFormatContext->priv_data is not always a MpegTSContext, it can be
RTSPState when decoding a RTP stream. So it is necessary to pass
MpegTSContext pointer explicitly.

Within libav, the write_section_data function doesn't actually use
the MpegTSContext at all, so this doesn't change anything at the
moment (no memory was corrupted before), but it reduces the risk of
anybody trying to touch the MpegTSContext via AVFormatContext->priv_data
in the future.

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

* commit '5adcef9c1bf701ba2dd43363ae983ba6d74bdb9a':
  mpegts: pass MpegTSContext ptr explicitly

See: 8635954335061ea4c03d3f492b7bc803ea740d9c:
Merged-by: Michael Niedermayer <michaelni@gmx.at>
build: rawvideo decoder depends on bswapdsp

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: simplify rounding

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: reorder loops

iterate over memory in a more continuous order

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix 2 coeffecient typo
hevc: derive partially amvp list

When the candidate has been found, no need to derive others.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc: derive partial merge list

The merge list only needs to be derived up to the merge index.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86/yadif-10: remove duplicate ABS macro

And use the x86util ones instead, which are optimized for mmxext/sse2.
About ~1% increase in performance on pre SSSE3 processors.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cdg: Forward error from avio_size() in read_header() function

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Merge commit '44386aaad870cbd80ae0d08247ebc663476446ff'

* commit '44386aaad870cbd80ae0d08247ebc663476446ff':
  cdg: Forward error from avio_size() in read_header() function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/cdg: Do not fail if filesize cannot be determined

This fixes cdg with piped input which was broken by the previous commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/rv34: fix crash while seeking on very damaged file

Fixes null pointer dereference
Fixes Ticket2093

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
hevc_ps: remove a write-only variable
hevc: Replace nal type chek with equivalent IS_IRAP macro

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
hevc: set the keyframe flag on output frames

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
hevc: implement pic_output_flag handling

Sample-Id: OPFLAG_B_Qualcomm_1.bit, OPFLAG_C_Qualcomm_1.bit
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
mov: Do not group tracks if more than one is enabled per type

The specification requires at most 1 track enabled per alternate group.
mov: Clarify tkhd flag settings
Merge commit '17e9d52c8c93f47721ff481b8867922f4b4bd663'

* commit '17e9d52c8c93f47721ff481b8867922f4b4bd663':
  hevc_ps: remove a write-only variable

Conflicts:
	libavcodec/hevc_ps.c

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