[MPlayer-dev-eng] Re: [PATCH]: Make TS Demuxer add streams in the same order independent on if vid/aid was set on commandline

Nico Sabbi nsabbi at email.it
Wed Jan 17 01:17:02 CET 2007


elupus wrote:

> Hi,
>
>> I don't like this patch, because ts_detect_streams() is called only 
>> during the
>> probing phase, thus it should never allocate sh_audio and sh_video 
>> structs.
>> I don't see the reason for this patch; maybe some audio or video tracks
>> are not detected in some of your samples? if so upload a sample to 
>> incoming, please
>
>
> ts_detect_streams is called on demux_open_ts to find the streams on 
> open. ts_check_file is used for probing the format, thus it shouldn't 
> be any problem with having it add the streams right?

adding the stream is not it's intended use

>
> In essence this is not really a bug that affects mplayer commandline 
> version. I don't think there is any problem with detecting streams 
> with the current way. However any gui that uses demuxer->a_streams[] 
> to list available audio streams will get them in different order 
> depending if any stream was specified on commandline.

this issue will have to be fixed differently (dunno how yet);
anyway I still have to adapt the demuxer to content changes
(programs ending and new ones appearing) so this problem will show
again for a different reason

>
> In any case, I made another patch that is abit cleaner (less code 
> duplication). It will do as I proposed in the previous mail, however I 
> suspect you'll not like that either :). Have a look anyway.
>
> Cheers
>
> /Joakim


applied this last one with some changes:
- removed the call to ts_add_stream() from ts_detect_stream()
- added the call to ts_add_stream() in ts_open()

Thanks a lot,

    Nico



More information about the MPlayer-dev-eng mailing list