[MPlayer-cvslog] r35503 - in trunk/libmpdemux: aviheader.c demux_avi.c

reimar subversion at mplayerhq.hu
Wed Nov 28 20:36:55 CET 2012


Author: reimar
Date: Wed Nov 28 20:36:55 2012
New Revision: 35503

Log:
Merge declaration and initialization.

Modified:
   trunk/libmpdemux/aviheader.c
   trunk/libmpdemux/demux_avi.c

Modified: trunk/libmpdemux/aviheader.c
==============================================================================
--- trunk/libmpdemux/aviheader.c	Wed Nov 28 20:28:57 2012	(r35502)
+++ trunk/libmpdemux/aviheader.c	Wed Nov 28 20:36:55 2012	(r35503)
@@ -616,8 +616,7 @@ if (index_file_load) {
   }
 
   for (i=0; i<priv->idx_size;i++) {
-    AVIINDEXENTRY *idx;
-    idx=&((AVIINDEXENTRY *)priv->idx)[i];
+    AVIINDEXENTRY *idx=&((AVIINDEXENTRY *)priv->idx)[i];
     fread(idx, sizeof(AVIINDEXENTRY), 1, fp);
     if (feof(fp)) {
       mp_msg(MSGT_HEADER,MSGL_ERR, MSGTR_MPDEMUX_AVIHDR_PrematureEOF, index_file_load);

Modified: trunk/libmpdemux/demux_avi.c
==============================================================================
--- trunk/libmpdemux/demux_avi.c	Wed Nov 28 20:28:57 2012	(r35502)
+++ trunk/libmpdemux/demux_avi.c	Wed Nov 28 20:36:55 2012	(r35503)
@@ -240,11 +240,10 @@ demux_stream_t *ds;
 
 do{
   int flags=1;
-  AVIINDEXENTRY *idx=NULL;
   if(priv->idx_size>0 && priv->idx_pos<priv->idx_size){
     off_t pos;
 
-    idx=&((AVIINDEXENTRY *)priv->idx)[priv->idx_pos++];
+    AVIINDEXENTRY *idx=&((AVIINDEXENTRY *)priv->idx)[priv->idx_pos++];
 
     if(idx->dwFlags&AVIIF_LIST){
       if (!valid_stream_id(idx->ckid))
@@ -326,7 +325,6 @@ int ret=0;
 
 do{
   int flags=1;
-  AVIINDEXENTRY *idx=NULL;
   int idx_pos=0;
   demux->filepos=stream_tell(demux->stream);
 
@@ -336,7 +334,7 @@ do{
 
   if(priv->idx_size>0 && idx_pos<priv->idx_size){
     off_t pos;
-    idx=&((AVIINDEXENTRY *)priv->idx)[idx_pos];
+    AVIINDEXENTRY *idx=&((AVIINDEXENTRY *)priv->idx)[idx_pos];
 
     if(idx->dwFlags&AVIIF_LIST){
       if (!valid_stream_id(idx->ckid))


More information about the MPlayer-cvslog mailing list