[MPlayer-cvslog] r35542 - in trunk/libmpdemux: demux_demuxers.c demuxer.c

reimar subversion at mplayerhq.hu
Fri Nov 30 23:12:17 CET 2012


Author: reimar
Date: Fri Nov 30 23:12:17 2012
New Revision: 35542

Log:
Fix scary "BUG! Invalid demuxer type ..." message
when using -audiofile or -subfile.

Modified:
   trunk/libmpdemux/demux_demuxers.c
   trunk/libmpdemux/demuxer.c

Modified: trunk/libmpdemux/demux_demuxers.c
==============================================================================
--- trunk/libmpdemux/demux_demuxers.c	Fri Nov 30 22:31:14 2012	(r35541)
+++ trunk/libmpdemux/demux_demuxers.c	Fri Nov 30 23:12:17 2012	(r35542)
@@ -66,8 +66,6 @@ demuxer_t*  new_demuxers_demuxer(demuxer
   memcpy(ret->a_streams, ad->a_streams, sizeof(ret->a_streams));
   memcpy(ret->s_streams, sd->s_streams, sizeof(ret->s_streams));
 
-  ret->desc = &demuxer_desc_demuxers;
-
   return ret;
 }
 

Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c	Fri Nov 30 22:31:14 2012	(r35541)
+++ trunk/libmpdemux/demuxer.c	Fri Nov 30 23:12:17 2012	(r35542)
@@ -108,6 +108,9 @@ extern const demuxer_desc_t demuxer_desc
 extern const demuxer_desc_t demuxer_desc_nut;
 extern const demuxer_desc_t demuxer_desc_mng;
 
+// never add this to the list
+extern const demuxer_desc_t demuxer_desc_demuxers;
+
 /* Please do not add any new demuxers here. If you want to implement a new
  * demuxer, add it to libavformat, except for wrappers around external
  * libraries and demuxers requiring binary support. */
@@ -214,6 +217,8 @@ demux_stream_t *new_demuxer_stream(struc
 static const demuxer_desc_t *get_demuxer_desc_from_type(int file_format)
 {
     int i;
+    if (file_format == DEMUXER_TYPE_DEMUXERS)
+        return &demuxer_desc_demuxers;
 
     for (i = 0; demuxer_list[i]; i++)
         if (file_format == demuxer_list[i]->type)


More information about the MPlayer-cvslog mailing list