[MPlayer-dev-eng] [PATCH] demux_ts fixes

Nico nsabbi at libero.it
Fri Jun 6 21:31:21 CEST 2003



You are right.
I'll clean both things, add the comment to the section of code currently
unused (as suggested by Diego)  and repost the patch .

Bye,
    Nico

----- Original Message -----
From: "Arpi" <arpi at thot.banki.hu>
To: <mplayer-dev-eng at mplayerhq.hu>
Sent: Friday, June 06, 2003 9:31 PM
Subject: Re: [MPlayer-dev-eng] [PATCH] demux_ts fixes


> Hi,
>
> > I fixed the following in demux_ts:
>
> I'm about commiting this, but i've find 2 serious problem:
> - you seem to use tabwidth=4, with tabwidth=8 it has unreadable random
> indentation. it wouldn't be problem fi you use tabs all time, but 4 spaces
> and tab is mixed resulting stuff like:
>
>         ES_stream_t *tss;
>     uint8_t done = 0;
>     int buf_size, is_start;
>     int len, pid, last_pid, cc, cc_ok, afc, _read;
>         ts_priv_t * priv = (ts_priv_t*) demuxer->priv;
>         stream_t *stream = demuxer->stream;
>         char *p, tmp[TS_FEC_PACKET_SIZE];
>         demux_stream_t *ds;
>         demux_packet_t *dp;
>
>
>     while(! done)       //while pid=last_pid add_to_buffer
>     {
>           if(! ts_sync(stream))
>           {
>             mp_msg(MSGT_DEMUX, MSGL_V, "TS_PARSE: COULDN'T SYNC\n");
>             return 0;
>       }
>
> i don't really care, but as this patch is mostly cosmetics anyway,
> and the original source was much better indented, i vote for fixing this
> (either convert tabs to spaces or 4tabs to 8tabs or sth) before commiting.
>
> - second problem: there are lots of namespace pollution: ie. private
> functions declared as global. please make all static except the really
> exported functions
>
(demux_seek_ts,demux_close_ts,demux_open_t,sts_check_file,demux_ts_fill_buff
er)
> exporting functions like ts_parse adn ts_sync ha sno sence and may result
in
> symbol clashes with external libraries.
>
> note that dvbin.c and friends ahs a lot more exported private variables
with
> very short, basic names, for example:
>
> dvb_channels_list  *list_ptr = NULL;
> int card=0;
>
>
>
> A'rpi / Astral & ESP-team
>
> --
> Developer of MPlayer G2, the Movie Framework for all -
http://www.MPlayerHQ.hu
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list