]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ptx.c
alacenc: consolidate bitstream writing into a single function.
[ffmpeg] / libavcodec / ptx.c
index 75b42d50732d06ecd1ab9b5d5ac1cf1cc55288c0..fd4933c1d6fc3d99e64861ebd35ddbc6e1703ea7 100644 (file)
@@ -84,7 +84,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     ptr    = p->data[0];
     stride = p->linesize[0];
 
-    for (y = 0; y < h && buf_end - buf < w * bytes_per_pixel; y++) {
+    for (y = 0; y < h && buf_end - buf >= w * bytes_per_pixel; y++) {
 #if HAVE_BIGENDIAN
         unsigned int x;
         for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel)