changeset 28413:34794b885cb2

Adapt to lzo changes in libavutil
author reimar
date Mon, 02 Feb 2009 20:22:36 +0000
parents 5e5e9962a96d
children 7cf701c99367
files libmpcodecs/vd_lzo.c libmpdemux/demux_mkv.c
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_lzo.c	Mon Feb 02 07:26:05 2009 +0000
+++ b/libmpcodecs/vd_lzo.c	Mon Feb 02 20:22:36 2009 +0000
@@ -55,7 +55,7 @@
 	return 0;
     }
     priv->bufsz = sh->bih->biSizeImage;
-    priv->buffer = malloc(priv->bufsz + LZO_OUTPUT_PADDING);
+    priv->buffer = malloc(priv->bufsz + AV_LZO_OUTPUT_PADDING);
     priv->codec = -1;
     sh->context = priv;
 
@@ -88,7 +88,7 @@
 	    return NULL; // skipped frame
     }
     
-    r = lzo1x_decode(priv->buffer, &w, data, &len);
+    r = av_lzo1x_decode(priv->buffer, &w, data, &len);
     if (r) {
 	/* this should NEVER happen */
 	mp_msg (MSGT_DECVIDEO, MSGL_ERR, 
--- a/libmpdemux/demux_mkv.c	Mon Feb 02 07:26:05 2009 +0000
+++ b/libmpdemux/demux_mkv.c	Mon Feb 02 20:22:36 2009 +0000
@@ -351,12 +351,12 @@
           while (1)
             {
               int srclen = *size;
-              if (dstlen > SIZE_MAX - LZO_OUTPUT_PADDING) goto lzo_fail;
-              *dest = realloc (*dest, dstlen + LZO_OUTPUT_PADDING);
-              result = lzo1x_decode (*dest, &dstlen, src, &srclen);
+              if (dstlen > SIZE_MAX - AV_LZO_OUTPUT_PADDING) goto lzo_fail;
+              *dest = realloc (*dest, dstlen + AV_LZO_OUTPUT_PADDING);
+              result = av_lzo1x_decode (*dest, &dstlen, src, &srclen);
               if (result == 0)
                 break;
-              if (!(result & LZO_OUTPUT_FULL))
+              if (!(result & AV_LZO_OUTPUT_FULL))
                 {
 lzo_fail:
                   mp_msg (MSGT_DEMUX, MSGL_WARN,
@@ -859,7 +859,7 @@
 	    // audit: cheap guard against overflows later..
 	    if (num > SIZE_MAX - 1000) return 0;
             l = x + num;
-            track->private_data = malloc (num + LZO_INPUT_PADDING);
+            track->private_data = malloc (num + AV_LZO_INPUT_PADDING);
             if (stream_read(s, track->private_data, num) != (int) num)
               goto err_out;
             track->private_size = num;
@@ -2875,8 +2875,8 @@
                 case MATROSKA_ID_BLOCK:
                   block_length = ebml_read_length (s, &tmp);
                   free(block);
-                  if (block_length > SIZE_MAX - LZO_INPUT_PADDING) return 0;
-                  block = malloc (block_length + LZO_INPUT_PADDING);
+                  if (block_length > SIZE_MAX - AV_LZO_INPUT_PADDING) return 0;
+                  block = malloc (block_length + AV_LZO_INPUT_PADDING);
                   demuxer->filepos = stream_tell (s);
                   if (stream_read (s,block,block_length) != (int) block_length)
                   {