#include "sunrast.h"
typedef struct SUNRASTContext {
- AVFrame picture;
PutByteContext p;
int depth; ///< depth of pixel
int length; ///< length (bytes) of image
return AVERROR(EINVAL);
}
- avctx->coded_frame = &s->picture;
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->key_frame = 1;
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
s->maptype = RMT_NONE;
s->maplength = 0;
case AV_PIX_FMT_PAL8 :
s->maptype = RMT_EQUAL_RGB;
s->maplength = 3 * 256;
+ /* fall-through */
case AV_PIX_FMT_GRAY8:
s->depth = 8;
break;
AVCodec ff_sunrast_encoder = {
.name = "sunrast",
+ .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_SUNRAST,
.priv_data_size = sizeof(SUNRASTContext),
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_MONOWHITE,
AV_PIX_FMT_NONE },
- .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
};