[vlc-devel] Re: amr, rtp/rtsp, part 2.
Alex Antropoff
alant at transtelecom.md
Mon Mar 20 08:10:57 CET 2006
On Sun, Mar 19, 2006 at 11:06:43PM +0100, Derk-Jan Hartman wrote:
DJH> *Applied*
DJH>
DJH>
DJH> On 19-mrt-2006, at 19:17, Alex Antropoff wrote:
DJH>
DJH> >Finally, I found the problem,
DJH> >live555 library return amr frames without frame header, like it
DJH> >does it with
DJH> >H261.
DJH> >Header stored in internal variable, so vlc must get it and insert
DJH> >before
DJH> >frame data. Simple patch is made attached.
Is it possible to apply my first amr patch ?
it fixes streaming of amr, inserting correct ToC byte.
--
Regards,
Alex Antropoff
-------------- next part --------------
--- vlc-svn-20060315.orig/modules/stream_out/rtp.c 2006-03-15 01:56:47.000000000 +0200
+++ vlc-svn-20060315/modules/stream_out/rtp.c 2006-03-17 01:23:28.000000000 +0200
@@ -2335,12 +2335,12 @@
(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;
More information about the vlc-devel
mailing list