diff yuv4mpeg.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 1e2ee60ad614
children 0fdc96c2f2fe
line wrap: on
line diff
--- a/yuv4mpeg.c	Tue May 25 23:06:00 2004 +0000
+++ b/yuv4mpeg.c	Sat May 29 02:06:32 2004 +0000
@@ -58,10 +58,9 @@
     return n;
 }
 
-static int yuv4_write_packet(AVFormatContext *s, int stream_index,
-                             const uint8_t *buf, int size, int64_t pts)
+static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
-    AVStream *st = s->streams[stream_index];
+    AVStream *st = s->streams[pkt->stream_index];
     ByteIOContext *pb = &s->pb;
     AVPicture *picture;
     int* first_pkt = s->priv_data;
@@ -71,7 +70,7 @@
     char buf1[20];
     uint8_t *ptr, *ptr1, *ptr2;
 
-    picture = (AVPicture *)buf;
+    picture = (AVPicture *)pkt->data;
 
     /* for the first packet we have to output the header as well */
     if (*first_pkt) {