[vlc-devel] [PATCH] decode an RTP/H264 elementary stream without using SDP

Rémi Denis-Courmont remi at remlab.net
Tue Sep 21 19:48:41 CEST 2010


   Hello,

Comments inline.

On Tuesday 21 September 2010, Tony Vankrunkelsven wrote:
> @@ -454,6 +453,11 @@ static void stream_decode (demux_t *demux, void *data,
> block_t *block) (void)demux;
>  }
> 
> +static void *demux_init (demux_t *demux)
> +{
> +    return stream_init (demux, *demux->psz_demux ? demux->psz_demux :
> "unknown");
> +}

Isn't that "unknown" path impossible? I would rather have an assertion here. 
Trying the "unknown" demuxer is not going to be any good.

> @@ -679,7 +683,28 @@ int rtp_autodetect (demux_t *demux, rtp_session_t
> *session, break;
> 
>        default:
> -        return -1;
> +        /*
> +         * If the rtp payload type is unknown then check demux if it is
> specified +         */
> +        if (*demux->psz_demux)

Isn't that statement redumdant with regards to the following strcmp()s?

> +        {
> +          if ((strcmp(demux->psz_demux, "h264") == 0) ||
> (strcmp(demux->psz_demux, "ts") == 0))
> +          {
> +            msg_Dbg (demux, "rtp autodetect specified demux=%s",
> demux->psz_demux); +            pt.init = demux_init;
> +            pt.destroy = stream_destroy;
> +            pt.decode = stream_decode;
> +            pt.frequency = 90000;
> +            break;

I assume you tested that this actually works? It would be nice to patch 
modules/services/discovery/sap.c accordingly then.

Best regards,

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list