comparison dv.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 b69898ffc92a
children 0fdc96c2f2fe
comparison
equal deleted inserted replaced
467:40069a91d1a0 468:60f897e8dd2d
886 return -1; 886 return -1;
887 } 887 }
888 return 0; 888 return 0;
889 } 889 }
890 890
891 static int dv_write_packet(struct AVFormatContext *s, 891 static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
892 int stream_index,
893 const uint8_t *buf, int size, int64_t pts)
894 { 892 {
895 uint8_t* frame; 893 uint8_t* frame;
896 int fsize; 894 int fsize;
897 895
898 fsize = dv_assemble_frame((DVMuxContext *)s->priv_data, s->streams[stream_index], 896 fsize = dv_assemble_frame((DVMuxContext *)s->priv_data, s->streams[pkt->stream_index],
899 buf, size, &frame); 897 pkt->data, pkt->size, &frame);
900 if (fsize > 0) { 898 if (fsize > 0) {
901 put_buffer(&s->pb, frame, fsize); 899 put_buffer(&s->pb, frame, fsize);
902 put_flush_packet(&s->pb); 900 put_flush_packet(&s->pb);
903 } 901 }
904 return 0; 902 return 0;