lavc: add a wrapper for AVCodecContext.get_buffer().

It will be useful in the upcoming transition to refcounted AVFrames.
lavc: set frame properties in ff_get_buffer().

There is no point in duplicating this code in every get_buffer()
implementation.
lavc: don't reuse audio buffers

Any performance gain from this is negligible and not worth the extra
code.
lavc: factorise setting buffer type in avcodec_default_get_buffer().
lavc: fix decode_frame() third parameter semantics for video decoders

It's got_frame, not data size
raw demuxer: initialize end of partial packets
eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()
mimic: initialize padding of swap_buf through av_fast_padded_malloc
fate: workaround for slighly broken 'test' shell builtin

Some shells, e.g. minix3, have a broken 'test' builtin which fails
if the first operand of a binary operator looks like a unary operator.
Prefixing the values with 'x' prevents this from happening.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'

* commit '594d4d5df3c70404168701dd5c90b7e6e5587793':
  lavc: add a wrapper for AVCodecContext.get_buffer().

Conflicts:
	libavcodec/4xm.c
	libavcodec/8svx.c
	libavcodec/bmv.c
	libavcodec/cljr.c
	libavcodec/cscd.c
	libavcodec/dnxhddec.c
	libavcodec/dpcm.c
	libavcodec/dpx.c
	libavcodec/eacmv.c
	libavcodec/eamad.c
	libavcodec/frwu.c
	libavcodec/g723_1.c
	libavcodec/gifdec.c
	libavcodec/idcinvideo.c
	libavcodec/iff.c
	libavcodec/indeo3.c
	libavcodec/internal.h
	libavcodec/interplayvideo.c
	libavcodec/kmvc.c
	libavcodec/mpc7.c
	libavcodec/mpegaudiodec.c
	libavcodec/pcx.c
	libavcodec/pngdec.c
	libavcodec/pnmdec.c
	libavcodec/rl2.c
	libavcodec/snow.c
	libavcodec/targa.c
	libavcodec/tscc.c
	libavcodec/txd.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vb.c
	libavcodec/vmdav.c
	libavcodec/vp56.c
	libavcodec/vqavideo.c
	libavcodec/wavpack.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ff953fecffd3b9a616a046723fb9d4690be032a6'

* commit 'ff953fecffd3b9a616a046723fb9d4690be032a6':
  lavc: set frame properties in ff_get_buffer().

Conflicts:
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavc: move ff_init_buffer_info() down to ff_get_buffer()

and remove redundant code from ff_get_buffer()

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

* commit 'e57c4706e969afa1f2384481b955ccd9494cddb5':
  lavc: don't reuse audio buffers

This commit causes a 0.5% speedloss for mp3 and 2% for raw pcm, that is
"time ffmpeg" style tested thus includes disk IO, demux and parsing

I would not have merged it if it wasnt required for the "new" buffer API
but sadly it is.
Once the new API is in ill reimplement proper buffer reuse, which will
fix this speedloss. In case we choose not to merge the "new" buffer
API then this commit here should be reverted.

Conflicts:
	libavcodec/internal.h
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '387bef95d28019c13c6805cfa4079e59948284e5'

* commit '387bef95d28019c13c6805cfa4079e59948284e5':
  lavc: factorise setting buffer type in avcodec_default_get_buffer().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'df9b9567518f2840d79a4a96b447ebe1aa326408'

* commit 'df9b9567518f2840d79a4a96b447ebe1aa326408':
  lavc: fix decode_frame() third parameter semantics for video decoders

Conflicts:
	libavcodec/cscd.c
	libavcodec/eamad.c
	libavcodec/ffv1dec.c
	libavcodec/gifdec.c
	libavcodec/h264.c
	libavcodec/iff.c
	libavcodec/mjpegdec.c
	libavcodec/pcx.c
	libavcodec/vp56.c

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

* qatar/master:
  fate: workaround for slighly broken 'test' shell builtin
  mimic: initialize padding of swap_buf through av_fast_padded_malloc
  eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()
  raw demuxer: initialize end of partial packets

Conflicts:
	tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavc: fix decode_frame() third parameter semantics for rest of video decoders

Signed-off-by: Paul B Mahol <onemda@gmail.com>
mpegvideo: remove #if/define PARANOID code

This code never did anything as far as i can remember

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2k: avoid printf() useage in debug code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
j2kenc: remove duplicate debug functions

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