summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorFrank Heckenbach <f.heckenbach@fh-soft.de>2015-07-04 00:48:47 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-07-04 00:51:03 +0200
commit161a301d44274645c2272855dac3e4664f935603 (patch)
tree9d6abc51beaa5d549b254b0f21957c28d030c209 /libavformat
parentd09b4cce21cdad5ef2855698395ffd6e37445212 (diff)
downloadffmpeg-streaming-161a301d44274645c2272855dac3e4664f935603.zip
ffmpeg-streaming-161a301d44274645c2272855dac3e4664f935603.tar.gz
mpjpeg: Write the Content-length
Diffstat (limited to 'libavformat')
-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