From e928649b0bf6c8c7b87eb09d5e393a70387b10e9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 29 May 2004 02:06:32 +0000 Subject: 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 --- libavformat/rm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libavformat/rm.c') diff --git a/libavformat/rm.c b/libavformat/rm.c index 7942337541..828921822c 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -389,14 +389,13 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size) return 0; } -static int rm_write_packet(AVFormatContext *s, int stream_index, - const uint8_t *buf, int size, int64_t pts) +static int rm_write_packet(AVFormatContext *s, AVPacket *pkt) { - if (s->streams[stream_index]->codec.codec_type == + if (s->streams[pkt->stream_index]->codec.codec_type == CODEC_TYPE_AUDIO) - return rm_write_audio(s, buf, size); + return rm_write_audio(s, pkt->data, pkt->size); else - return rm_write_video(s, buf, size); + return rm_write_video(s, pkt->data, pkt->size); } static int rm_write_trailer(AVFormatContext *s) -- cgit v1.2.3