summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavformat/mpjpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index 6c469e0..1a78c32 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -33,7 +33,10 @@ static int mpjpeg_write_header(AVFormatContext *s)
static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
- avio_printf(s->pb, "Content-type: image/jpeg\n\n");
+ avio_printf(s->pb,
+ "Content-length: %i\n"
+ "Content-type: image/jpeg\n\n",
+ pkt->size);
avio_write(s->pb, pkt->data, pkt->size);
avio_printf(s->pb, "\n--%s\n", BOUNDARY_TAG);
OpenPOWER on IntegriCloud