[MPlayer-cvslog] r37690 - trunk/stream/stream_dvd.c

reimar subversion at mplayerhq.hu
Fri Feb 12 20:57:02 CET 2016


Author: reimar
Date: Fri Feb 12 20:57:01 2016
New Revision: 37690

Log:
Remove pointless NULL checks.

If they failed we would just crash a
few lines further down.
As we don't really seem to have had
crashes, just remove the checks so
it is at least consistent.

Modified:
   trunk/stream/stream_dvd.c

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Fri Feb 12 20:47:26 2016	(r37689)
+++ trunk/stream/stream_dvd.c	Fri Feb 12 20:57:01 2016	(r37690)
@@ -885,14 +885,13 @@ static int open_s(stream_t *stream,int m
     d->vts_file=vts_file;
     d->cur_title = dvd_title+1;
 
-    pgc = vts_file->vts_pgcit ? vts_file->vts_pgcit->pgci_srp[ttn].pgc : NULL;
+    pgc = vts_file->vts_pgcit->pgci_srp[ttn].pgc;
     /**
      * Check number of audio channels and types
      */
     {
-      d->nr_of_channels=0;
-      if(vts_file->vts_pgcit) {
         int i;
+      d->nr_of_channels=0;
         for(i=0;i<8;i++)
           if(pgc->audio_control[i] & 0x8000) {
             audio_attr_t * audio = &vts_file->vtsi_mat->vts_audio_attr[i];
@@ -943,7 +942,6 @@ static int open_s(stream_t *stream,int m
 
            d->nr_of_channels++;
          }
-      }
       mp_msg(MSGT_OPEN,MSGL_STATUS,MSGTR_DVDnumAudioChannels,d->nr_of_channels );
     }
 


More information about the MPlayer-cvslog mailing list