[FFmpeg-cvslog] rtmp: Allow having more unknown data at the end of a chunk size packet without failing

Samuel Pitoiset git at videolan.org
Sat Jul 28 00:10:44 CEST 2012


ffmpeg | branch: master | Samuel Pitoiset <samuel.pitoiset at gmail.com> | Thu Jul 26 14:05:58 2012 +0200| [e49e6b645167df0e15781244a2e1e405abb04bf1] | committer: Martin Storsjö

rtmp: Allow having more unknown data at the end of a chunk size packet without failing

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/rtmpproto.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 183afae..4e5eddb 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -885,9 +885,9 @@ static int handle_chunk_size(URLContext *s, RTMPPacket *pkt)
     RTMPContext *rt = s->priv_data;
     int ret;
 
-    if (pkt->data_size != 4) {
+    if (pkt->data_size < 4) {
         av_log(s, AV_LOG_ERROR,
-               "Chunk size change packet is not 4 bytes long (%d)\n",
+               "Too short chunk size change packet (%d)\n",
                pkt->data_size);
         return AVERROR_INVALIDDATA;
     }



More information about the ffmpeg-cvslog mailing list