[MPlayer-cvslog] r37624 - trunk/libmpdemux/demux_ty.c

reimar subversion at mplayerhq.hu
Mon Feb 8 22:04:24 CET 2016


Author: reimar
Date: Mon Feb  8 22:04:24 2016
New Revision: 37624

Log:
Move variable into more local scope.

Avoids Coverity warning.
Also do not use variable named aid for
the video ID, that is pointlessly
confusing.

Modified:
   trunk/libmpdemux/demux_ty.c

Modified: trunk/libmpdemux/demux_ty.c
==============================================================================
--- trunk/libmpdemux/demux_ty.c	Mon Feb  8 21:54:49 2016	(r37623)
+++ trunk/libmpdemux/demux_ty.c	Mon Feb  8 22:04:24 2016	(r37624)
@@ -344,8 +344,6 @@ static int demux_ty_fill_buffer( demuxer
 
    int              counter;
 
-   int              aid;
-
    TiVoInfo         *tivo = demux->priv;
    unsigned char    *chunk = tivo->chunk;
 
@@ -496,13 +494,12 @@ static int demux_ty_fill_buffer( demuxer
 
 
    // Let's make a Video Demux Stream for MPlayer
-   aid = 0x0;
-   if( !demux->v_streams[ aid ] ) new_sh_video( demux, aid );
-   if( demux->video->id == -1 ) demux->video->id = aid;
-   if( demux->video->id == aid )
+   if( !demux->v_streams[ 0 ] ) new_sh_video( demux, 0 );
+   if( demux->video->id == -1 ) demux->video->id = 0;
+   if( demux->video->id == 0 )
    {
       demux_stream_t *ds = demux->video;
-      if( !ds->sh ) ds->sh = demux->v_streams[ aid ];
+      if( !ds->sh ) ds->sh = demux->v_streams[ 0 ];
    }
 
    // ======================================================================
@@ -554,6 +551,7 @@ static int demux_ty_fill_buffer( demuxer
          {
             if( demux->audio->id == -1 )
             {
+               int aid = 0;
                if ( nybbleType == 0x02 )
                   continue;    // DTiVo inconclusive, wait for more
                else if ( nybbleType == 0x09 )
@@ -586,8 +584,6 @@ static int demux_ty_fill_buffer( demuxer
                }
             }
 
-            aid = demux->audio->id;
-
 
             // SA DTiVo Audio Data, no PES
             // ================================================


More information about the MPlayer-cvslog mailing list