[vlc-devel] Fwd: Re: gbazin - sdt.c
Wallace Wadge
wwadge at gmail.com
Sat Sep 24 21:09:41 CEST 2005
This is the third time I'm trying to post this to the vlc-devel list - why
are mailing list messages getting lost???? :-(
Wallace
---------- Forwarded message ----------
From: Wallace Wadge <wwadge at gmail.com>
Date: Sep 21, 2005 1:11 PM
Subject: Re: [vlc-devel] Re: gbazin - sdt.c
To: vlc-devel at videolan.org
yes the whole section needs moving up. diff follows:
Index: modules/mux/mpeg/ts.c
===================================================================
--- modules/mux/mpeg/ts.c (revision 12632)
+++ modules/mux/mpeg/ts.c (working copy)
@@ -502,6 +502,9 @@
uint16_t i_pid;
psz_next = psz;
+ #ifndef HAVE_BSEARCH
+ msg_Warn( p_mux, "Cannot use --sout-ts-muxpmt (bsearch
function not found during compilation)\n");
+ #endif
while( psz != NULL )
{
i_pid = strtoul( psz, &psz_next, 0 );
@@ -2325,15 +2328,8 @@
GetDescriptorLength24b( bits.i_data -
bits_fix_ESDescr.i_data - 3 ) );
}
- }
- bits_align( &bits );
- /* fix IOD length */
- bits_write( &bits_fix_IOD, 24,
- GetDescriptorLength24b( bits.i_data -
- bits_fix_IOD.i_data - 3 ) );
-
-#if 0//def HAVE_BSEARCH /* FIXME!!! This can't possibly work */
- i_pidinput = p_mux->pp_inputs[i]->p_fmt->i_id;
+#ifdef HAVE_BSEARCH
+ i_pidinput = p_mux->pp_inputs[i_stream]->p_fmt->i_id;
p_usepid = bsearch( &i_pidinput, p_sys->pmtmap, p_sys->i_pmtslots,
sizeof(pmt_map_t), intcompare );
p_usepid = bsearch( &p_usepid, p_sys->pmtmap, p_sys->i_num_pmt,
@@ -2348,6 +2344,13 @@
dvbpsi_PMTAddDescriptor( &p_sys->dvbpmt[0], 0x1d, bits.i_data,
bits.p_data );
#endif
+ }
+ bits_align( &bits );
+ /* fix IOD length */
+ bits_write( &bits_fix_IOD, 24,
+ GetDescriptorLength24b( bits.i_data -
+ bits_fix_IOD.i_data - 3 ) );
+
}
for( i_stream = 0; i_stream < p_mux->i_nb_inputs; i_stream++ )
Wallace
On 9/19/05, Christophe Massiot <massiot at via.ecp.fr> wrote:
>
> On Mon, Sep 19, 2005, Wallace Wadge wrote:
> > wops, "i" is supposed to be "i_stream" I think....
>
> I don't think so, since we aren't in the for() loop there.
>
> >
> >
> >
> > On 9/19/05, Christophe Massiot < massiot at via.ecp.fr> wrote:
> > >
> > > On Mon, Sep 19, 2005, Wallace Wadge wrote:
> > > > Hi gbazin,
> > > >
> > > > Can you please elaborate on
> > > https://trac.videolan.org/vlc/changeset/12601 ?
> > > > (/* FIXME!!! This can't possibly work */ )
> > > >
> > > > All I need in that part is the original pid of the input to
> selectively
> > > > add/ignore it in the pmt.
> > >
> > > The problem is in :
> > > i_pidinput = p_mux->pp_inputs[i]->p_fmt->i_id;
> > >
> > > Where does 'i' come from ? It just overflows pp_inputs[] here.
> > >
> > > --
> > > Christophe Massiot.
> > >
> > > --
> > > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > > To unsubscribe, please read http://developers.videolan.org/lists.html
> > >
> > >
> --
> Christophe Massiot.
>
> --
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20050924/12fcabb7/attachment.html>
More information about the vlc-devel
mailing list