Merge commit 'd48c20630214a4effcc920e93a5044bee4e2002e'

* commit 'd48c20630214a4effcc920e93a5044bee4e2002e':
  qtrleenc: use the AVFrame API properly.
  ulti: use the AVFrame API properly.
  vc1: use the AVFrame API properly.
  flashsv: use the AVFrame API properly.

Conflicts:
	libavcodec/flashsv.c
	libavcodec/qtrleenc.c
	libavcodec/ulti.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 92cbd775687204f9750a09c69f97702719036aab)

Conflicts:

	libavcodec/flashsv.c
Author of the merged code: Anton Khirnov
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpegvideo_enc: use the AVFrame API properly.
  ffv1: use the AVFrame API properly.
  jpegls: use the AVFrame API properly.
  huffyuv: use the AVFrame API properly.

Conflicts:
	libavcodec/ffv1.c
	libavcodec/ffv1.h
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c

Changes to ffv1 are more redone than merged due to them being based on
an ancient codebase and a good part of that having being done already
as well.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be1e6e7503b2f10b0176201418eb97912cee093f)

Conflicts:

	libavcodec/ffv1enc.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
Author of the merged code: Anton Khirnov
Merge commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5'

* commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5':
  mjpegdec: use the AVFrame API properly.

Conflicts:
	libavcodec/mjpegdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 639303867640d1880fad675472bc47e9c95f96c7)

Author of the merged code: Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add support for picture_ptr field in MJpegDecodeContext

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit e0e3b8b297bae5144f23fd4b46a1309857040b63)

Conflicts:

	libavcodec/jpeglsdec.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2fade10cb0c53e6b2a663d8ce0566ba7c61013cf)

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

* commit 'afa21a12bf084f905187615706b0a8d92bc98661':
  p*menc: use the AVFrame API properly.

Conflicts:
	libavcodec/Makefile
	libavcodec/pamenc.c
	libavcodec/pnmenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 37945584bfb29f187e38531c90bb02a32014e48d)

Author of the merged code: Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b605b123ef1d3bac0e7c221d8d7fa74cd8c7253c'

* commit 'b605b123ef1d3bac0e7c221d8d7fa74cd8c7253c':
  mxpegdec: use the AVFrame API properly.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8947f47fdfaf7f3a907a334fc65dc724f2fdd23f)

Author of the merged code: Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'd351ef47d0e0ccb7de96b37f137c16b2885580ac'

* commit 'd351ef47d0e0ccb7de96b37f137c16b2885580ac':
  pthread_frame: use the AVFrame API properly.

Conflicts:
	libavcodec/pthread_frame.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 45fd4ec9ef2b3a7074c49cdddac6e7dcc127a874)

Conflicts:

	libavcodec/pthread_frame.c
Author of the merged code: Anton Khirnov
Merge commit 'd4f1188d1a662fed5347e70016da49e01563e8a8'

* commit 'd4f1188d1a662fed5347e70016da49e01563e8a8':
  dv: use AVFrame API properly

Conflicts:
	libavcodec/dvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 94a849b8b6c3e4a90361485b2e12a9a5c35833a3)

Conflicts:

	libavcodec/dv.h
	libavcodec/dvdec.c
	libavcodec/dvenc.c

Author of the merged code: Anton Khirnov
avcodec/libutvideodec: use av_frame_move_ref()

AVFrames cannot be copied literally, their definition is in
avutil and their extended_data can point to their data[]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4c1b4ae1baf77df7150fa8cbcece8057a261e47d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: implement avcodec_alloc_frame() through av_alloc_frame()

This ensures that theres just one AVFrame allocation function and libs dont
produce multiple AVFrame variants after a minor lib update

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5abdda214df53f009434f19b9eb8e1375f2924d9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/diracdec: avoid depending on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fca7943850ecdc1e67a0275b488768be01867f75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/msvideo1enc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c81234651f761a44a3e72829fd494211e237069c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegenc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5b3f4b3ef590b1221d44d24345a846c1aa636b69)

Conflicts:

	libavcodec/mjpegenc.c
avcodec/libopenjpegenc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1458f0647ca0c882cc1c29892ac130a1056a1f47)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/j2kenc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8443b27072a076abb28d7f2f60bc90e1d5c285df)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/flashsv2enc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b8f4410ff60b3a973cd13351d00a1d88eaddfb71)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bf1c87ee7ab1b98c1b92172eb1ebd6ad55564ff7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/libvorbisenc: drop dependancy on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3c8b085764ed4b036df4a8908a0781dc6d73ee11)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: drop 2 dependancies on sizeof(AVFrame)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c90f31146e8b1407a4a5808d0d904d85baeed5d4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffprobe: Dont clear AVFrame between uses.

The old API required this clearing in the past, the new API does not
require it.

Fixes memleak
Regression introduced by 37a749012aaacc801fe860428417a6d7b81c103f

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 565f786d1da1fea80fcea231550d5d0f174c009a)

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