}
}
-#ifndef WORDS_BIGENDIAN
+#if !HAVE_BIGENDIAN
#define copy_frame_16 copy_frame_default
#define copy_frame_32 copy_frame_default
#define add_frame_16 add_frame_default
#endif
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
- const uint8_t *buf, int buf_size) {
+ AVPacket *avpkt) {
+ const uint8_t *buf = avpkt->data;
+ int buf_size = avpkt->size;
CamStudioContext *c = avctx->priv_data;
AVFrame *picture = data;
static av_cold int decode_init(AVCodecContext *avctx) {
CamStudioContext *c = avctx->priv_data;
- if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
- return 1;
- }
switch (avctx->bits_per_coded_sample) {
case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;