h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles

Fixes bug 396.

CC: libav-stable@libav.org
mov: handle h263 and flv1 for codec_tag 'H','2','6','3'

The sample in https://bugzilla.libav.org/show_bug.cgi?id=393 and
samples/F4V/H263_NM_f.mp4 both have codec_tag H263 for different
codecs. H263 is apparently used by Flash Media Server for Sorensen
Spark videos.

Patch based on commit 5442083b1c541dd166b3adf39131259fc846a62b by
Carl Eugen Hoyos. Fixes bug 393.
cmdutils: pass number of groups to split_commandline().

This makes the code simpler and avoids mixing designated and
non-designated initializers in a potentially unsafe way in avconv.
mpeg12: do not decode extradata more than once.

Fixes CVE-2012-2803.

CC: libav-stable@libav.org
lavr: add option for dithering during sample format conversion to s16
lavfi/select: fix compilation with avcodec disabled.
sapenc: Pass the title on to the chained muxers

This makes sure it ends up in the SDP, providing a proper session name
in the SAP announcements.

Signed-off-by: Martin Storsjö <martin@martin.st>
flvenc: Check whether seeking back to the header succeeded

The FLV muxer tries to update the header in write_trailer, which is
impossible if writing to a pipe or network stream. Don't write header
data if seeking to the header fails.

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

* commit 'c661cb6672af5ebcb900ec8766b24761bd2ab011':
  cmdutils: pass number of groups to split_commandline().
  mov: handle h263 and flv1 for codec_tag 'H','2','6','3'
  h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profiles

Conflicts:
	libavcodec/h264_ps.c
	libavformat/isom.c
	libavformat/mov.c

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

* qatar/master:
  lavr: add option for dithering during sample format conversion to s16
  mpeg12: do not decode extradata more than once.

Conflicts:
	libavcodec/mpeg12.c
	libavcodec/mpeg12.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
h264: Fix code to also handle pix format changes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavfi: add a channels field to AVFilterLink.

Also: fix af_pan and af_aresample, that forgot to update
audio->channels.
lavfi: add an accessor for ref->audio->channels.
lavfi/buffersrc: remove init of rate and layout.

The sample rate and channel layout are negotiated and set
by the filter graph system, the filters must not set them.
lavfi: remove init and check of rate and layout.

The sample rate and channel layout are negotiated and set
by the filter graph system.
rtp: Don't read priv_data unless it is allocated

This makes all users of rtpenc_chain (rtsp muxer, sapenc, mov
rtp hinting) work again, broken since 8034130e0.

Signed-off-by: Martin Storsjö <martin@martin.st>
lavc: introduce VideoDSPContext

Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
lavc: add missing files for arm

Across the many retouches those did not make the main commit.
aiffenc: set correct number of bits foru8 in aiff

with this change QuickTime is able to play u8 aiff file generated by FFmpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf: split packets before muxing.

After demuxing, data and side are merged. Before decoding, they are
split. Encoder will perform with data and side split. This means that a
muxer can receive split data (after encoding) but also merged data (if
called directly after demuxing). This commit makes sure data and side
are split for the muxer.