[FFmpeg-devel] Realmedia patch

Luca Abeni lucabe72
Sun Aug 31 21:37:07 CEST 2008


Hi Ronald,

Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Aug 30, 2008 at 6:05 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> - one that implements RDT-specific packet handling (rtsp.c -> rdt.c)
>> At that point, ffplay should be able to play Realmedia/RTSP streams.
> 
> And here's #2. With the previous patches applied, I can play RTSP streams.

Ok, good. Can you check if there are previous patches which still need
feedback?

> Luca, please let me know if the above ff_rdt_parse_packet() was what
> you had in mind.

Yes, the rtsp.c part is more or less what I had in mind.

[...]
> +static void
> +finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t ts)
> +{
> +    pkt->pts = ts;
> +    pkt->stream_index = s->st->index;
> +}

Why this separate function? It looks useless.


> Index: ffmpeg-svn/libavformat/rtsp.c
> ===================================================================
> --- ffmpeg-svn.orig/libavformat/rtsp.c	2008-08-30 21:14:35.000000000 -0400
> +++ ffmpeg-svn/libavformat/rtsp.c	2008-08-30 21:14:36.000000000 -0400
> @@ -1334,7 +1334,10 @@
>  
>      /* get next frames from the same RTP packet */
>      if (rt->cur_rtp) {
> -        ret = rtp_parse_packet(rt->cur_rtp, pkt, NULL, 0);
> +        if (rt->server_type == RTSP_SERVER_RDT)
> +            ret = ff_rdt_parse_packet(rt->cur_rtp, pkt, NULL, 0);
> +        else
> +            ret = rtp_parse_packet(rt->cur_rtp, pkt, NULL, 0);
>          if (ret == 0) {
>              rt->cur_rtp = NULL;
>              return 0;
> @@ -1361,7 +1364,10 @@
>      }
>      if (len < 0)
>          return len;
> -    ret = rtp_parse_packet(rtsp_st->rtp_ctx, pkt, buf, len);
> +    if (rt->server_type == RTSP_SERVER_RDT)
> +        ret = ff_rdt_parse_packet(rtsp_st->rtp_ctx, pkt, buf, len);
> +    else
> +        ret = rtp_parse_packet(rtsp_st->rtp_ctx, pkt, buf, len);
>      if (ret < 0)
>          goto redo;
>      if (ret == 1) {

I think this part is ok.



				Luca




More information about the ffmpeg-devel mailing list