[vlc-commits] commit: vod: limit dynamic payload type to 127 (Pierre Ynard )

git at videolan.org git at videolan.org
Sun May 23 20:34:31 CEST 2010


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sun May 23 20:33:03 2010 +0200| [84d7407b82e6f77e592f0f52bb9bfaac6a627ded] | committer: Pierre Ynard 

vod: limit dynamic payload type to 127

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84d7407b82e6f77e592f0f52bb9bfaac6a627ded
---

 modules/misc/rtsp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index fcacfe7..87bbf84 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -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;



More information about the vlc-commits mailing list