aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpjpeg.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/mpjpeg.c
parenta7b2871cd1401ce7be59b153eed3f25565b0bb23 (diff)
downloadffmpeg-e928649b0bf6c8c7b87eb09d5e393a70387b10e9.tar.gz
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/mpjpeg.c')
-rw-r--r--libavformat/mpjpeg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index 434e519d50..da61c0726a 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -33,14 +33,13 @@ static int mpjpeg_write_header(AVFormatContext *s)
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 @@ static int single_jpeg_write_header(AVFormatContext *s)
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 */
}