[FFmpeg-devel] [RFC] rtpdec: Reordering RTP packets

Ronald S. Bultje rsbultje
Mon May 17 15:23:08 CEST 2010


Hi,

On Sun, May 16, 2010 at 3:41 PM, Martin Storsj? <martin at martin.st> wrote:
> So, here's a more proper implementation of RTP packet reordering.
[..]
> --- a/libavformat/rtsp.c
> +++ b/libavformat/rtsp.c
> @@ -694,10 +694,14 @@ static int rtsp_open_transport_ctx(AVFormatContext *s, RTSPStream *rtsp_st)
>          rtsp_st->transport_priv = ff_rdt_parse_open(s, st->index,
>                                              rtsp_st->dynamic_protocol_context,
>                                              rtsp_st->dynamic_handler);
> -    else
> +    else {
>          rtsp_st->transport_priv = rtp_parse_open(s, st, rtsp_st->rtp_handle,
>                                           rtsp_st->sdp_payload_type,
>                                           &rtsp_st->rtp_payload_data);
> +        if (rtsp_st->transport_priv)
> +            ((RTPDemuxContext*)rtsp_st->transport_priv)->no_reorder =
> +                rt->lower_transport == RTSP_LOWER_TRANSPORT_TCP;
> +    }
>
>      if (!rtsp_st->transport_priv) {
>           return AVERROR(ENOMEM);

Bleh, can't you transmit rt->transport_priv or that == TCP as an
argument to rtp_parse_open()? I'm trying to get rid of all these
RTP/RDT-specific casts in rtsp.c.

Ronald



More information about the ffmpeg-devel mailing list