#include "put_bits.h"
-typedef struct {
+typedef struct GIFContext {
LZWState *lzw;
uint8_t *buf;
} GIFContext;
{
GIFContext *s = avctx->priv_data;
- avctx->coded_frame = av_frame_alloc();
- if (!avctx->coded_frame)
- return AVERROR(ENOMEM);
-
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
avctx->coded_frame->key_frame = 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
s->lzw = av_mallocz(ff_lzw_encode_state_size);
if (!s->lzw)
{
GIFContext *s = avctx->priv_data;
- av_frame_free(&avctx->coded_frame);
-
av_freep(&s->lzw);
av_freep(&s->buf);
return 0;