]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qtrleenc.c
Support for BMP os2v1.
[ffmpeg] / libavcodec / qtrleenc.c
index 581a55b69a1825418fcfc8a517e1df303eae8a3e..9adab61827e9aea839f32b4c9580317a37967245 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;