]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qtrleenc.c
Make AVCodec long_names definition conditional depending on CONFIG_SMALL.
[ffmpeg] / libavcodec / qtrleenc.c
index 581a55b69a1825418fcfc8a517e1df303eae8a3e..6cea66281a380e369bb7fa3ff37247439dc64c8c 100644 (file)
@@ -57,7 +57,7 @@ typedef struct QtrleEncContext {
     uint8_t* skip_table;
 } QtrleEncContext;
 
-static int qtrle_encode_init(AVCodecContext *avctx)
+static av_cold int qtrle_encode_init(AVCodecContext *avctx)
 {
     QtrleEncContext *s = avctx->priv_data;
 
@@ -254,7 +254,7 @@ static int encode_frame(QtrleEncContext *s, AVFrame *p, uint8_t *buf)
 
     bytestream_put_be32(&buf, 0);                         // CHUNK SIZE, patched later
 
-    if (start_line == 0 && end_line == s->avctx->height || start_line == s->avctx->height)
+    if ((start_line == 0 && end_line == s->avctx->height) || start_line == s->avctx->height)
         bytestream_put_be16(&buf, 0);                     // header
     else {
         bytestream_put_be16(&buf, 8);                     // header
@@ -303,7 +303,7 @@ static int qtrle_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size,
     return chunksize;
 }
 
-static int qtrle_encode_end(AVCodecContext *avctx)
+static av_cold int qtrle_encode_end(AVCodecContext *avctx)
 {
     QtrleEncContext *s = avctx->priv_data;
 
@@ -322,5 +322,6 @@ AVCodec qtrle_encoder = {
     qtrle_encode_init,
     qtrle_encode_frame,
     qtrle_encode_end,
-    .pix_fmts = (enum PixelFormat[]){PIX_FMT_RGB24, -1},
+    .pix_fmts = (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_NONE},
+    .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"),
 };