lavc: allow the caller to override dimensions in ff_get_buffer()

This will be useful for allocating edges in the encoders.
mpegvideo: allocate edges when encoding.

Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.
lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().
examples: add remuxing example

Show how to perform streamcopy from one container to another.
examples/muxing: factorize write_interleave code

Also log output packet information.
examples/muxing: change error checks, from "ret != 0" to "ret < 0"

More consistent and more future-proof.
examples/muxing: remove redundant {}
Merge commit 'f7e85ee996b3886c2b13e928b83277382311af96'

* commit 'f7e85ee996b3886c2b13e928b83277382311af96':
  lavc: allow the caller to override dimensions in ff_get_buffer()

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegvideo_enc: disable direct mode in load_input_picture() for dimensions%16 != 0

We currently read a whole 16x16 block from the input at a few places

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '024db24912a39316b0ef0b7d793307d62da038f4'

* commit '024db24912a39316b0ef0b7d793307d62da038f4':
  mpegvideo: allocate edges when encoding.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/diracdec: allocate edges internally instead of depending on CODEC_FLAG_EMU_EDGE being not set

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/vmnc: Check  that rectangles are within the picture

Prevents out of array accesses with CODEC_FLAG_EMU_EDGE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/jpeg2000dec: calculate planar and pixelsize from pixel format descriptor

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/jpeg2000dec: fix error detection in pix_fmt_match()

Fixes out of array accesses with CODEC_FLAG_EMU_EDGE

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

* qatar/master:
  lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().

Conflicts:
	doc/APIchanges
	libavcodec/utils.c
	libavcodec/version.h

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

* cehoyos/master:
  Avoid a possible overflow when reading Nikon avi files.
  Add h263dsp dependency to mpeg1video and mpeg2video encoders.
  Fix compilation with --disable-hwaccel=mpeg1_xvmc,mpeg2_xvmc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mov: do not set avg_frame_rate in the demuxer

The track duration is often not reliable or is not the duration
represented by the number of frames. In those cases, avg_frame_rate
was reported incorrectly. Removing this code falls back to the
default calculation in avformat_find_stream_info().

This is a partial revert of commit c3aeaa540.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
rtmpproto: Avoid using uninitialized memory

If the url ends with .flv, we stripped it but didn't initialize
rt->playpath, doing av_strlcat on an uninitialized buffer.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing

The normal differential timestamps can't handle negative
differences, thus send a full packet header with an absolute
timestamp in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
Move add/diff_int16 to lossless_videodsp

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