[MPlayer-cvslog] r28448 - in trunk: libmpcodecs/vd_lzo.c libmpdemux/demux_mkv.c

reimar subversion at mplayerhq.hu
Mon Feb 2 21:22:37 CET 2009


Author: reimar
Date: Mon Feb  2 21:22:36 2009
New Revision: 28448

Log:
Adapt to lzo changes in libavutil

Modified:
   trunk/libmpcodecs/vd_lzo.c
   trunk/libmpdemux/demux_mkv.c

Modified: trunk/libmpcodecs/vd_lzo.c
==============================================================================
--- trunk/libmpcodecs/vd_lzo.c	Mon Feb  2 08:26:05 2009	(r28447)
+++ trunk/libmpcodecs/vd_lzo.c	Mon Feb  2 21:22:36 2009	(r28448)
@@ -55,7 +55,7 @@ static int init(sh_video_t *sh)
 	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 @@ static mp_image_t* decode(sh_video_t *sh
 	    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, 

Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c	Mon Feb  2 08:26:05 2009	(r28447)
+++ trunk/libmpdemux/demux_mkv.c	Mon Feb  2 21:22:36 2009	(r28448)
@@ -351,12 +351,12 @@ demux_mkv_decode (mkv_track_t *track, ui
           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 @@ demux_mkv_read_trackentry (demuxer_t *de
 	    // 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 @@ demux_mkv_fill_buffer (demuxer_t *demuxe
                 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)
                   {



More information about the MPlayer-cvslog mailing list