summaryrefslogtreecommitdiff
path: root/libavformat/rtp.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-29 02:06:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-29 02:06:32 +0000
commite928649b0bf6c8c7b87eb09d5e393a70387b10e9 (patch)
tree3f065adcb0e5c14127d01162d7cc8a0d934c073f /libavformat/rtp.c
parenta7b2871cd1401ce7be59b153eed3f25565b0bb23 (diff)
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 Originally committed as revision 3168 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtp.c')
-rw-r--r--libavformat/rtp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 5d4884d8f7..31e4a21dc1 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -669,16 +669,17 @@ static void rtp_send_mpegts_raw(AVFormatContext *s1,
}
/* 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 @@ static int rtp_write_packet(AVFormatContext *s1, int stream_index,
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;