#include "put_bits.h"
#include "simple_idct.h"
#include "dvdata.h"
+#include "dv.h"
typedef struct BlockInfo {
const uint32_t *factor_table;
int buf_size = avpkt->size;
DVVideoContext *s = avctx->priv_data;
const uint8_t* vsc_pack;
- int apt, is16_9;
+ int apt, is16_9, ret;
s->sys = avpriv_dv_frame_profile(s->sys, buf, buf_size);
if (!s->sys || buf_size < s->sys->frame_size || ff_dv_init_dynamic_tables(s->sys)) {
s->picture.pict_type = AV_PICTURE_TYPE_I;
avctx->pix_fmt = s->sys->pix_fmt;
avctx->time_base = s->sys->time_base;
- avcodec_set_dimensions(avctx, s->sys->width, s->sys->height);
+
+ ret = ff_set_dimensions(avctx, s->sys->width, s->sys->height);
+ if (ret < 0)
+ return ret;
+
if (ff_get_buffer(avctx, &s->picture, 0) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
AVCodec ff_dvvideo_decoder = {
.name = "dvvideo",
+ .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext),
.close = dvvideo_close,
.decode = dvvideo_decode_frame,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS,
- .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
};