[MPlayer-dev-eng] [PATCH] Automate mov to mpegps demuxer switch

Nico Sabbi nicola_sabbi at fastwebnet.it
Wed Aug 2 22:42:38 CEST 2006


John Koleszar wrote:

>Hi all,
>
>Attached patch provides improved support for MPEG streams in QT containers.
>These files can currently only be played by passing '-demuxer mpegps' on the
>command line. This was previously discussed on this list back in October 2005,
>but nobody implemented the proposed change.
>
>This patch tries to automate that switch by chaining the MPEG_PS demuxer if no
>streams were found by the normal method. Chaining demuxers also happens in the
>Ogg-in-AVI case as well as the RTP example quoted in the original thread.
>
>Earlier discussion of this issue:
>http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2005-October/037880.html
>
>The sample from the original post is still online:
>http://www.vai.com/updates/vh-1_vids/MOV00059.mov
>
>Is this acceptable, 
>

no

>and if not, what needs to be done to make it so?
>  
>
unconditionally searching an mpegps stream as a fallback  when no audio 
and no video
streams were found is wrong. Mpeg in mov is qualified by appropriate 
identifiers
in the atoms (that thread should describe them).

>Thanks,
>
>John
>
>  
>
>------------------------------------------------------------------------
>
>Index: libmpdemux/demux_mov.c
>===================================================================
>--- libmpdemux/demux_mov.c	(revision 19294)
>+++ libmpdemux/demux_mov.c	(working copy)
>@@ -1890,6 +1890,16 @@
> 	}
>     }
> 
>+    if(demuxer->video->id<0 && demuxer->audio->id<0) {
>+        /* No AV streams found. Try to find an MPEG stream. */
>+        demuxer_t* od = demux_open(demuxer->stream, DEMUXER_TYPE_MPEG_PS,
>+                                   -1, -1, -2, NULL);
>+        if(od) {
>+            free_demuxer(demuxer);
>+            demuxer = new_demuxers_demuxer(od, od, od);
>+        }
>+    }
>+
> #if 0
>     if( mp_msg_test(MSGT_DEMUX,MSGL_DBG3) ){
> 	for(t_no=0;t_no<priv->track_db;t_no++){
>  
>
>------------------------------------------------------------------------
>

rejected for the reason explained.

    Nico



More information about the MPlayer-dev-eng mailing list