[FFmpeg-soc] [soc]: r4457 - in rtmp: rtmppkt.c rtmppkt.h

kostya subversion at mplayerhq.hu
Tue Jun 16 18:29:02 CEST 2009


Author: kostya
Date: Tue Jun 16 18:29:02 2009
New Revision: 4457

Log:
Add unknown (for now) extra field in RTMP packet

Modified:
   rtmp/rtmppkt.c
   rtmp/rtmppkt.h

Modified: rtmp/rtmppkt.c
==============================================================================
--- rtmp/rtmppkt.c	Tue Jun 16 18:27:48 2009	(r4456)
+++ rtmp/rtmppkt.c	Tue Jun 16 18:29:02 2009	(r4457)
@@ -150,7 +150,7 @@ int rtmp_packet_write(AVFormatContext *c
             bytestream_put_be24(&p, pkt->data_size);
             bytestream_put_byte(&p, pkt->type);
             if (mode == RTMP_PS_TWELVEBYTES)
-                bytestream_put_le32(&p, 0); //FIXME put real data here
+                bytestream_put_le32(&p, pkt->extra);
         }
     }
     url_write(h, pkt_hdr, p-pkt_hdr);
@@ -168,6 +168,7 @@ int rtmp_packet_create(RTMPPacket *pkt, 
     pkt->stream_id = stream_id;
     pkt->type      = type;
     pkt->timestamp = timestamp;
+    pkt->extra     = 0;
 
     return 0;
 }

Modified: rtmp/rtmppkt.h
==============================================================================
--- rtmp/rtmppkt.h	Tue Jun 16 18:27:48 2009	(r4456)
+++ rtmp/rtmppkt.h	Tue Jun 16 18:29:02 2009	(r4457)
@@ -101,6 +101,7 @@ typedef struct RTMPPacket {
     uint8_t        stream_id; ///< stream ID
     RTMPPacketType type;      ///< packet type
     int            timestamp; ///< packet timestamp
+    int            extra;     ///< additional data
     uint8_t        *data;     ///< packet payload
     int            data_size; ///< packet payload size
 } RTMPPacket;


More information about the FFmpeg-soc mailing list