[FFmpeg-cvslog] rtspdec: Require TCP-interleaved RTP packets to be at least 11 bytes, instead of 12.

Martin Storsjö git at videolan.org
Tue Sep 20 23:15:09 CEST 2011


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Sep 20 21:58:15 2011 +0200| [847052db34e61778a1408fa06a47f0cbc0dc7a32] | committer: Michael Niedermayer

rtspdec: Require TCP-interleaved RTP packets to be at least 11 bytes, instead of 12.
(A minimal RTP packet is 12 bytes, but a minimal RTCP packet can be
much smaller, at least as small as 8 bytes.)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=847052db34e61778a1408fa06a47f0cbc0dc7a32
---

 libavformat/rtspdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index c2a81f2..2391055 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -204,7 +204,7 @@ redo:
     id  = buf[0];
     len = AV_RB16(buf + 1);
     av_dlog(s, "id=%d len=%d\n", id, len);
-    if (len > buf_size || len < 12)
+    if (len > buf_size || len < 8)
         goto redo;
     /* get the data */
     ret = ffurl_read_complete(rt->rtsp_hd, buf, len);



More information about the ffmpeg-cvslog mailing list