Do not read strd chunk in avi files as H264 extradata.

Fixes ticket #2561.
(cherry picked from commit 231b3317184790b6be4b4619d96fd328f13aeabb)

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
avidec: dont randomly skip packets for offseting the index

Fixes Ticket2490

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c593f1b671b7725b8c36f92f7c0a23ccf8e7628)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
configure: Autodetect VA-API

This fixes a regression (reproducible since 1.2) and restores the
behaviour of 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 1.0 and 1.1.
(cherry picked from commit 17989dcf540c13a7122663f64c09dc830ffc3a41)

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
ffmpeg: free threads on error conditions.

Fixes Ticket2562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1a36c756d8959207d3386f03e11c15216abc50b7)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
smacker: remove av_clip_int16()

Fixes Ticket2425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2211c76287e073a9e176fde7dbb9a63ceb2af8d1)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
avienc: Disallow the first frame to be skiped

Fixes Ticket2386

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cc0db8cf3042186d8355dcf10be67071cfbbcc5d)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
h264_cavlc: fix reading skip run

Fixes Ticket2606

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 826b3a75cd295c03720e00d3de83e1abcbedd4b9)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
mpegvideo: implement ff_put_h264_chroma_mc1 & ff_avg_h264_chroma_mc2

These are needed for lowres 3

Fixes Ticket2538

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c2625c26c5e58edfa39360b51125f1ddd593e4db)

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
AAC encoder: Fix rate control on twoloop.

Fixes a case where multichannel bitrate isn't accurately
targetted by psy model alone, never achieving the target bitrate.
Now fixed.

Fixes ticket #2625.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
Backport FFmpeg's af589dd5e9f804629ac025ba6b40f750426a6e41 commit

This re-add VAAPI auto-detect from FFmpeg's configure. It wasn't necessary as such as VAAPI auto-detection was working in our configure. But using ffmpeg's one help re-syncing later
mpeg: Add passing DVD navigation packets (startcode 0x1bf) to caller to allow better playback handling of DVDs.

The two types of packets (PCI and DSI) are passed untouched but combined by the new codec ID AV_CODEC_ID_DVD_NAV.
 The first 980 bytes in the packet contain the PCI data. The next 1018 are the DSI data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit FFmpeg:9cde9f70ab482287d892cac20679f40a6673baa8)

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
Add AV_CODEC_ID_DVD_NAV support to myth's ff_codec_id_string

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>