]> git.sesse.net Git - vlc/commitdiff
vod: limit dynamic payload type to 127
authorPierre Ynard <linkfanel@yahoo.fr>
Sun, 23 May 2010 18:33:03 +0000 (20:33 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Sun, 23 May 2010 18:33:03 +0000 (20:33 +0200)
modules/misc/rtsp.c

index fcacfe7f5c4312ddbef5c587ee23ae4846ff582e..87bbf84914312b35077e63c7e52c48ea9c98b009 100644 (file)
@@ -492,6 +492,13 @@ static void MediaDel( vod_t *p_vod, vod_media_t *p_media )
 static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
 {
     char *psz_urlc;
+
+    if( p_media->i_payload_type >= 128 )
+    {
+        msg_Err( p_vod, "too many elementary streams");
+        return VLC_EGENERIC;
+    }
+
     media_es_t *p_es = calloc( 1, sizeof(media_es_t) );
     if( !p_es )
         return VLC_ENOMEM;