#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
+
#include "libavutil/attributes.h"
#include "libavutil/colorspace.h"
#include "libavutil/opt.h"
}
#ifdef DEBUG
-#undef fprintf
-#undef perror
-#undef exit
static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h,
uint32_t *rgba_palette)
{
parse_palette(ctx, data + 8);
} else if (strncmp("size:", data, 5) == 0) {
int w, h;
- if (sscanf(data + 5, "%dx%d", &w, &h) == 2 &&
- av_image_check_size(w, h, 0, avctx) >= 0)
- avcodec_set_dimensions(avctx, w, h);
+ if (sscanf(data + 5, "%dx%d", &w, &h) == 2) {
+ int ret = ff_set_dimensions(avctx, w, h);
+ if (ret < 0)
+ return ret;
+ }
}
data += pos;