[FFmpeg-soc] [soc]: r4456 - rtmp/rtmppkt.c

kostya subversion at mplayerhq.hu
Tue Jun 16 18:27:49 CEST 2009


Author: kostya
Date: Tue Jun 16 18:27:48 2009
New Revision: 4456

Log:
Check chunk marker when reading RTMP packet

Modified:
   rtmp/rtmppkt.c

Modified: rtmp/rtmppkt.c
==============================================================================
--- rtmp/rtmppkt.c	Tue Jun 16 18:24:50 2009	(r4455)
+++ rtmp/rtmppkt.c	Tue Jun 16 18:27:48 2009	(r4456)
@@ -126,6 +126,10 @@ int rtmp_packet_read(AVFormatContext *ct
         offset    += hist->chunk_size[stream_id];
         if (data_size > 0) {
             url_read_complete(h, &t, 1); //marker
+            if (t != (0xC0 + stream_id)) {
+                av_log(ctx, AV_LOG_ERROR, "Expected marker %02X, got %02X\n", t, 0xC0 + stream_id);
+                return -1;
+            }
         }
     }
     return 0;


More information about the FFmpeg-soc mailing list