h264: use mbaff ref indices in fill_colmap() only for mbaff references

Prevents writing beyond array bounds.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
configure: formatting cosmetics
misc typo, style and wording fixes
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  configure: formatting cosmetics
  h264: use mbaff ref indices in fill_colmap() only for mbaff references

Conflicts:
	libavcodec/h264_direct.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avfilter: add apad filter

This filter pads an audio stream with silence
It can together with -shortest be used to extend audio streams to
the same length as video.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
af_apad: add user setable packet_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
apad: fix apad_options formating

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
apad: add whole_len and pad_len options.

These options allow padding to a specific length or adding a specific amount if silence.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
af_apad: remove unneeded av_opt_free

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
h264: increase dist_scale_factor for up to 32 references

Compute dist_scale_factor_field only for MBAFF since that is the only
case in which it is used.
ff_h264_direct_ref_list_init: fix B slice check.

Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
mpegvideo: allocate scratch buffers after linesize is known

Since we can't know which stride a custom get_buffer() implementation is
going to use we have to allocate this scratch buffers after the linesize
is known. It was pretty safe for 8 bit per pixel pixel formats since we
always allocated memory for up to 16 bits per pixel. It broke hoever
with cmdutis.c's alloc_buffer() and high pixel bit depth since it
allocated larger edges than mpegvideo expected.

Fixes fuzzed sample nasa-8s2.ts_s244342.
h264: support frame parameter changes during frame-mt

Fixes CVE-2012-2782.
cmdutils: add a macro to simplify grow_array() calls.
cmdutils: split parse_option().

Separate the code that searches for the option to use and the code that
actually writes it. The writing code will be reused by the new options
parser.
cmdutils: add a commandline pre-parser.

It splits the commandline into a more convenient internal representation
for further parsing.

This will allow e.g.
- processing global options first independently of their location on the
  commandline, eliminating ugly hacks for processing e.g. cpuflags
  first
- better options validation and error reporting. It is now possible for
  the parser to know that it's applying an input option to an output
  file or vice versa and act accordingly.
cmdutils: don't log an error in opt_default().

It results in spurious errors when using the new preparser.
avconv: use new options parser.
avconv: pass the actually selected decoder to filter_codec_opts().
avcodec: bump minor for adaptive h264 frame-mt

Also adds forgotten Changelog entry.