-
- switch(avctx->pix_fmt){
- case PIX_FMT_BGR24:
- c->imgtype = IMGTYPE_RGB24;
- c->decomp_size = avctx->width * avctx->height * 3;
- avctx->bits_per_coded_sample= 24;
- break;
- default:
- av_log(avctx, AV_LOG_ERROR, "Input pixel format %s not supported\n", avcodec_get_pix_fmt_name(avctx->pix_fmt));
- return -1;
- }
-
- ((uint8_t*)avctx->extradata)[0]= 4;
- ((uint8_t*)avctx->extradata)[1]= 0;
- ((uint8_t*)avctx->extradata)[2]= 0;
- ((uint8_t*)avctx->extradata)[3]= 0;
- ((uint8_t*)avctx->extradata)[4]= c->imgtype;
- ((uint8_t*)avctx->extradata)[5]= c->compression;
- ((uint8_t*)avctx->extradata)[6]= c->flags;
- ((uint8_t*)avctx->extradata)[7]= CODEC_ZLIB;
+ c->imgtype = IMGTYPE_RGB24;
+ avctx->bits_per_coded_sample= 24;
+
+ avctx->extradata[0]= 4;
+ avctx->extradata[1]= 0;
+ avctx->extradata[2]= 0;
+ avctx->extradata[3]= 0;
+ avctx->extradata[4]= c->imgtype;
+ avctx->extradata[5]= c->compression;
+ avctx->extradata[6]= c->flags;
+ avctx->extradata[7]= CODEC_ZLIB;