]> git.sesse.net Git - ffmpeg/commitdiff
rtmp: Allow having more unknown data at the end of a chunk size packet without failing
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 26 Jul 2012 12:05:58 +0000 (14:05 +0200)
committerMartin Storsjö <martin@martin.st>
Thu, 26 Jul 2012 19:56:54 +0000 (22:56 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtmpproto.c

index 183afae4e8d2714ff7df59a4d02016a68ef5761f..4e5eddb69a41faf14f1051244279234f8c8c6f99 100644 (file)
@@ -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;
     }