changeset 35409:232b1aacffda

Merge declaration and initialization.
author reimar
date Wed, 28 Nov 2012 19:36:55 +0000
parents 1d088d51c7f6
children 1c991ec0e6da
files libmpdemux/aviheader.c libmpdemux/demux_avi.c
diffstat 2 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Wed Nov 28 19:28:57 2012 +0000
+++ b/libmpdemux/aviheader.c	Wed Nov 28 19:36:55 2012 +0000
@@ -616,8 +616,7 @@
   }
 
   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);
--- a/libmpdemux/demux_avi.c	Wed Nov 28 19:28:57 2012 +0000
+++ b/libmpdemux/demux_avi.c	Wed Nov 28 19:36:55 2012 +0000
@@ -240,11 +240,10 @@
 
 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 @@
 
 do{
   int flags=1;
-  AVIINDEXENTRY *idx=NULL;
   int idx_pos=0;
   demux->filepos=stream_tell(demux->stream);
 
@@ -336,7 +334,7 @@
 
   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))