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

Nico Sabbi nsabbi at email.it
Thu Aug 3 17:50:30 CEST 2006


John Koleszar wrote:
> Nico Sabbi wrote:
>   
>> John Koleszar wrote:
>>
>>     
>>> Nico Sabbi wrote:
>>>  
>>>
>>>       
>>>> 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).
>>>>
>>>>   
>>>>         
>>> Ok. I didn't recognize the 1ba and m1s atoms identified in the other
>>> thread as
>>> being QT atoms, and was under the impression you were suggesting
>>> searching the
>>> payload to try and identify it.. Is keying off the media handler atom
>>> (mhlr)
>>> subtype (MPEG) sufficient?
>>>
>>> MOV:   Handler header: mhlr/MPEG (appl) Apple MPEG Media Handler
>>>
>>>  
>>>
>>>       
>> I think so, but when dealing with MOV who can be sure of anything?
>> my discussion in irc with the author of the other patch leads me to believe
>> that the presence of that atom is enough
>>     
>
> Here's another cut at it, this time checking for a track with its media handler
> set to MPEG.
>
>   
> ------------------------------------------------------------------------
>
> Index: libmpdemux/demux_mov.c
> ===================================================================
> --- libmpdemux/demux_mov.c	(revision 19294)
> +++ libmpdemux/demux_mov.c	(working copy)
> @@ -1890,6 +1890,22 @@
>  	}
>      }
>  
> +    if(demuxer->video->id<0 && demuxer->audio->id<0) {
> +        /* No AV streams found. Try to find an MPEG stream. */
> +        for(t_no=0;t_no<priv->track_db;t_no++){
> +            mov_track_t* trak=priv->tracks[t_no];
> +            if(trak->media_handler == MOV_FOURCC('M','P','E','G')) {
> +                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);
> +                }
> +                break;
> +            }
> +        }
> +    }
> +
>  #if 0
>      if( mp_msg_test(MSGT_DEMUX,MSGL_DBG3) ){
>  	for(t_no=0;t_no<priv->track_db;t_no++){
>   
> ------------------------------------------------------------------------
>
>   

better but still wrong; I'll fix it tonight
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Partecipa al concorso e vinci ricchissimi set di prodotti Sheba per deliziare il tuo gatto per un anno intero! 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5266&d=3-8



More information about the MPlayer-dev-eng mailing list