API changes, most recent first:
+201x-xx-xx - xxxxxxx - lavc 56.8.0 - avcodec.h
+ Add AVCodecContext.sw_pix_fmt.
+
2014-12-04 - xxxxxxx - lavc 56.14.100 - dv_profile.h
Add av_dv_codec_profile2().
*/
AVRational framerate;
+ /**
+ * Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
+ * - encoding: unused.
+ * - decoding: Set by libavcodec before calling get_format()
+ */
+ enum AVPixelFormat sw_pix_fmt;
+
/**
* Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
* Code outside libavcodec should access this field using:
if ((ret = ff_init_buffer_info(avctx, frame)) < 0)
return ret;
- if (hwaccel && hwaccel->alloc_frame) {
- ret = hwaccel->alloc_frame(avctx, frame);
- goto end;
- }
+ if (hwaccel) {
+ if (hwaccel->alloc_frame) {
+ ret = hwaccel->alloc_frame(avctx, frame);
+ goto end;
+ }
+ } else
+ avctx->sw_pix_fmt = avctx->pix_fmt;
#if FF_API_GET_BUFFER
FF_DISABLE_DEPRECATION_WARNINGS
while (fmt[n] != AV_PIX_FMT_NONE)
++n;
+ av_assert0(n >= 1);
+ avctx->sw_pix_fmt = fmt[n - 1];
+ av_assert2(!is_hwaccel_pix_fmt(avctx->sw_pix_fmt));
+
choices = av_malloc_array(n + 1, sizeof(*choices));
if (!choices)
return AV_PIX_FMT_NONE;
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 56
-#define LIBAVCODEC_VERSION_MINOR 16
+#define LIBAVCODEC_VERSION_MINOR 17
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \