]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/lclenc.c
pgssubdec: reset rle_data_len/rle_remaining_len on allocation error
[ffmpeg] / libavcodec / lclenc.c
index 6edde076b32ba9f32615dd9e81e0416a62b36914..2e00807b88cb72c176872492be33e25ac89be8a6 100644 (file)
@@ -35,7 +35,6 @@
  *   http://www.pcisys.net/~melanson/codecs
  *
  * Supports: BGR24 (RGB 24bpp)
- *
  */
 
 #include <stdio.h>
@@ -49,9 +48,6 @@
 
 #include <zlib.h>
 
-/*
- * Decoder context
- */
 typedef struct LclEncContext {
 
     AVCodecContext *avctx;
@@ -65,11 +61,6 @@ typedef struct LclEncContext {
     z_stream zstream;
 } LclEncContext;
 
-/*
- *
- * Encode a frame
- *
- */
 static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                         const AVFrame *pict, int *got_packet)
 {
@@ -120,11 +111,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     return 0;
 }
 
-/*
- *
- * Init lcl encoder
- *
- */
 static av_cold int encode_init(AVCodecContext *avctx)
 {
     LclEncContext *c = avctx->priv_data;
@@ -138,8 +124,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
     if (!avctx->extradata)
         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
 
     // Will be user settable someday
     c->compression = 6;
@@ -169,11 +159,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
     return 0;
 }
 
-/*
- *
- * Uninit lcl encoder
- *
- */
 static av_cold int encode_end(AVCodecContext *avctx)
 {
     LclEncContext *c = avctx->priv_data;