*/
#include "avcodec.h"
+#include "internal.h"
#include "davs2.h"
typedef struct DAVS2Context {
frame->buf[plane] = av_buffer_alloc(size_line * pic->lines[plane]);
if (!frame->buf[plane]){
- av_log(avctx, AV_LOG_ERROR, "dump error: alloc failed.\n");
+ av_log(avctx, AV_LOG_ERROR, "Decoder error: allocation failure, can't dump frames.\n");
return AVERROR(ENOMEM);
}
return ret == 0 ? buf_size : ret;
}
-AVCodec ff_libdavs2_decoder = {
+const AVCodec ff_libdavs2_decoder = {
.name = "libdavs2",
.long_name = NULL_IF_CONFIG_SMALL("libdavs2 AVS2-P2/IEEE1857.4"),
.type = AVMEDIA_TYPE_VIDEO,
.close = davs2_end,
.decode = davs2_decode_frame,
.flush = davs2_flush,
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
+ .caps_internal = FF_CODEC_CAP_AUTO_THREADS,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE },
.wrapper_name = "libdavs2",