[MPlayer-dev-eng] Re: [PATCH] support for interleaved streams from RT[S]P

Alban Bedel albeu at free.fr
Fri Aug 15 15:41:35 CEST 2003


Hi Nico,

on Mon, 11 Aug 2003 12:14:32 +0200 you wrote:

> 
> Hi,
> 
> Ross suggested that the code for linking demux_rtp and 
> demux_SOMETHING_ELSE  when the stream is interleaved
> should  go to demuxer.c.
> Attached is  the patch to do it.
>
>
> Note1: I believe it's wrong way to do it, because in my opinion every 
> demuxer should be as self-hosting as possible, so
> I would put this code in demux_rtp.cpp. Anyways, for the sake of 
> playback :) I wrote this patch (I tested it streaming a
> dvd to 127.0.0.1:1234  by VLS).
Yes, this should not be in demuxer.c if possible.

> Note2:   because of the way I linked the demuxers, during playback 
> demuxer.c complains:
 
> Opened TS demuxer...WARNING: Video stream header 0 redefined.
> WARNING: Audio stream header 0 redefined.
This is because of :
+	sh_v = new_sh_video(od, 0);
+	sh_v->ds = od->video;
+	demuxer->video->sh = sh_v;
+		  
+	sh_a = new_sh_audio(od, 0);
+	sh_a->ds = od->audio;
+	demuxer->audio->sh = sh_a;

You must return the new demuxer instead of doing such
non-sense hack.
 
> Is there anything that I should add to the patch? (maybe some 
> close(sh_video)  or something similar?)
I don't think you need anything else.
	Albeu

-- 

Everything is controlled by a small evil group
to which, unfortunately, no one we know belongs.




More information about the MPlayer-dev-eng mailing list