h261: check the mtype index

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
dxa: Make sure the reference frame exists

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Merge commit 'c59967fa7cc5bc2fa06b36c17d2c207240c06b3e'

* commit 'c59967fa7cc5bc2fa06b36c17d2c207240c06b3e':
  h261: check the mtype index

Conflicts:
	libavcodec/h261dec.c

The right half of the check is impossible to be true and thus replaced by
an assert()

See: ec3cd74f2dab8e3e8234ccb994132b23d3098585
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  dxa: Make sure the reference frame exists

See: 12eb2fd5394813a6119912b22f5dfc17b4a6b4a0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
dxa: only fail with an error about reference frames if the reference frame would be used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
dxa: fix support of decoding all frames even in the absence of references

The case where decoding should only happen for keyframes and afterwards
(CODEC_FLAG2_SHOW_ALL not set) does not fully work neither before nor
after this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avisynth: Support video input from AviSynth 2.5 properly.

Uses the 2.5 compatibility header included with the variant of
FFMS2 that uses AviSynth's C-interface. A copy of this header is
now provided in compat/avisynth.

avs_get_row_size_p and avs_get_height_p changed between versions
2.5 and 2.6. Since the avisynth_c.h header that avformat uses
assumes AviSynth 2.6, it would cause 2.5 to crash if given any
kind of real video (the Version() function was known to work,
though).

AvxSynth was unaffected by this issue because, despite being based
on AviSynth 2.5.8 and using 2.5.8's interface version number of 3,
it actually uses 2.6's versions of these functions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dxa: Support printing picture debug info

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