[MPlayer-cvslog] r20515 - trunk/libmpdemux/demux_real.c

rtogni subversion at mplayerhq.hu
Sun Oct 29 15:26:23 CET 2006


Author: rtogni
Date: Sun Oct 29 15:26:23 2006
New Revision: 20515

Modified:
   trunk/libmpdemux/demux_real.c

Log:
Prevent segfault if video codec init fails


Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	(original)
+++ trunk/libmpdemux/demux_real.c	Sun Oct 29 15:26:23 2006
@@ -571,6 +571,10 @@
     int x, sps, cfs, sph, spc, w;
     int audioreorder_getnextpk = 0;
 
+  // Don't demux video if video codec init failed
+  if (demuxer->video->id >= 0 && !demuxer->video->sh)
+    demuxer->video->id = -2;
+
   while(!stream_eof(demuxer->stream)){
 
     /* Handle audio/video demxing switch for multirate files (non-interleaved) */



More information about the MPlayer-cvslog mailing list