]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/huffyuv.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / huffyuv.c
index 80b35ed9c83ca4da0d4d3637e8e9bd5241dc4830..386653518f97bd3e097f568f820a95ac87b19816 100644 (file)
@@ -58,17 +58,11 @@ av_cold int ff_huffyuv_alloc_temp(HYuvContext *s)
 {
     int i;
 
-    if (s->bitstream_bpp<24 || s->version > 2) {
-        for (i=0; i<3; i++) {
-            s->temp[i]= av_malloc(2*s->width + 16);
-            if (!s->temp[i])
-                return AVERROR(ENOMEM);
-            s->temp16[i] = (uint16_t*)s->temp[i];
-        }
-    } else {
-        s->temp[0]= av_mallocz(4*s->width + 16);
-        if (!s->temp[0])
+    for (i=0; i<3; i++) {
+        s->temp[i]= av_malloc(4*s->width + 16);
+        if (!s->temp[i])
             return AVERROR(ENOMEM);
+        s->temp16[i] = (uint16_t*)s->temp[i];
     }
     return 0;
 }