Mercurial > libavformat.hg
diff rtp.c @ 468:60f897e8dd2d libavformat
pass AVPacket into av_write_frame()
fixes the random dts/pts during encoding
asf preroll fix
no more initial zero frames for b frame encoding
mpeg-es dts during demuxing fixed
.ffm timestamp scale fixed, ffm is still broken though
author | michael |
---|---|
date | Sat, 29 May 2004 02:06:32 +0000 |
parents | 845f9de2c883 |
children | af4e24d6310c |
line wrap: on
line diff
--- a/rtp.c Tue May 25 23:06:00 2004 +0000 +++ b/rtp.c Sat May 29 02:06:32 2004 +0000 @@ -669,16 +669,17 @@ } /* write an RTP packet. 'buf1' must contain a single specific frame. */ -static int rtp_write_packet(AVFormatContext *s1, int stream_index, - const uint8_t *buf1, int size, int64_t pts) +static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) { RTPDemuxContext *s = s1->priv_data; AVStream *st = s1->streams[0]; int rtcp_bytes; int64_t ntp_time; + int size= pkt->size; + uint8_t *buf1= pkt->data; #ifdef DEBUG - printf("%d: write len=%d\n", stream_index, size); + printf("%d: write len=%d\n", pkt->stream_index, size); #endif /* XXX: mpeg pts hardcoded. RTCP send every 0.5 seconds */ @@ -687,7 +688,7 @@ if (s->first_packet || rtcp_bytes >= 28) { /* compute NTP time */ /* XXX: 90 kHz timestamp hardcoded */ - ntp_time = (pts << 28) / 5625; + ntp_time = (pkt->pts << 28) / 5625; rtcp_send_sr(s1, ntp_time); s->last_octet_count = s->octet_count; s->first_packet = 0;