]> git.sesse.net Git - vlc/commitdiff
* Fix AMR RTP muxing. patch by Alex Antropoff <alant at transtelecom dot md>.
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 23 Mar 2006 20:25:07 +0000 (20:25 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 23 Mar 2006 20:25:07 +0000 (20:25 +0000)
modules/stream_out/rtp.c

index 3d7a567f79f6f0d760769c47490ff526a669bc10..3dee93dbbc76228282c9b05ce283d2df57e53d70 100644 (file)
@@ -2351,12 +2351,12 @@ static int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
                               (in->i_pts > 0 ? in->i_pts : in->i_dts) );
         /* Payload header */
         out->p_buffer[12] = 0xF0; /* CMR */
-        out->p_buffer[13] = 0x00; /* ToC */ /* FIXME: frame type */
+        out->p_buffer[13] = p_data[0]&0x7C; /* ToC */ /* FIXME: frame type */
 
         /* FIXME: are we fed multiple frames ? */
-        memcpy( &out->p_buffer[14], p_data, i_payload );
+        memcpy( &out->p_buffer[14], p_data+1, i_payload-1 );
 
-        out->i_buffer   = 14 + i_payload;
+        out->i_buffer   = 14 + i_payload-1;
         out->i_dts    = in->i_dts + i * in->i_length / i_count;
         out->i_length = in->i_length / i_count;