[FFmpeg-devel] [PATCH] RDT/Realmedia patches #2

Michael Niedermayer michaelni
Thu Nov 27 00:40:24 CET 2008


On Sun, Nov 23, 2008 at 11:16:19AM -0500, Ronald S. Bultje wrote:
> Hi,
> 
> On Mon, Nov 17, 2008 at 5:11 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Mon, Nov 17, 2008 at 09:40:34AM -0500, Ronald S. Bultje wrote:
> >> @@ -324,11 +325,12 @@
> >>      if (!s->parse_packet)
> >>          return -1;
> >>
> >> -    if (!buf) {
> >> +    if (!buf && s->prev_stream_id != -1) {
> >>          /* return the next packets, if any */
> >>          timestamp= 0; ///< Should not be used if buf is NULL, but should be set to the timestamp of the packet returned....
> >>          rv= s->parse_packet(s->dynamic_protocol_context,
> >> -                            s->st, pkt, &timestamp, NULL, 0, flags);
> >
> >> +                            s->ic->streams[s->st->index + s->prev_stream_id],
> >
> > s->st has a poor name and lacks documentation
> 
> This patch changes the prototype of rdt_demux_context_open() so that
> it takes an index integer to the first AVStream pointed to by the
> RTSPStream, matching the fact that one RTSPStream (in RDT) can have
> multiple contained (AV)streams.
[...]
> Index: ffmpeg-svn/libavformat/rdt.h
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rdt.h	2008-11-18 20:24:07.000000000 -0500
> +++ ffmpeg-svn/libavformat/rdt.h	2008-11-23 09:52:23.000000000 -0500
> @@ -28,7 +28,7 @@
>  
>  typedef struct RDTDemuxContext RDTDemuxContext;
>  
> -RDTDemuxContext *ff_rdt_parse_open(AVFormatContext *ic, AVStream *st,
> +RDTDemuxContext *ff_rdt_parse_open(AVFormatContext *ic, int first_stream_index,
>                                     void *priv_data,
>                                     RTPDynamicProtocolHandler *handler);

first?
first is 0, yes iam dumb :)
but seriously, i dont think its clear to the reader what first_stream_index
really is.

anyway IMHO the function needs some documentation anyway ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081127/5cef6ac2/attachment.pgp>



More information about the ffmpeg-devel mailing list