Mercurial > libavformat.hg
diff mpjpeg.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 | a313e1080322 |
children | 9ace3075f33a |
line wrap: on
line diff
--- a/mpjpeg.c Tue May 25 23:06:00 2004 +0000 +++ b/mpjpeg.c Sat May 29 02:06:32 2004 +0000 @@ -33,14 +33,13 @@ return 0; } -static int mpjpeg_write_packet(AVFormatContext *s, int stream_index, - const uint8_t *buf, int size, int64_t pts) +static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt) { uint8_t buf1[256]; snprintf(buf1, sizeof(buf1), "Content-type: image/jpeg\n\n"); put_buffer(&s->pb, buf1, strlen(buf1)); - put_buffer(&s->pb, buf, size); + put_buffer(&s->pb, pkt->data, pkt->size); snprintf(buf1, sizeof(buf1), "\n--%s\n", BOUNDARY_TAG); put_buffer(&s->pb, buf1, strlen(buf1)); @@ -75,10 +74,9 @@ return 0; } -static int single_jpeg_write_packet(AVFormatContext *s, int stream_index, - const uint8_t *buf, int size, int64_t pts) +static int single_jpeg_write_packet(AVFormatContext *s, AVPacket *pkt) { - put_buffer(&s->pb, buf, size); + put_buffer(&s->pb, pkt->data, pkt->size); put_flush_packet(&s->pb); return 1; /* no more data can be sent */ }