[FFmpeg-cvslog] mpjpeg: Write the Content-length
Frank Heckenbach
git at videolan.org
Thu Jul 9 00:20:27 CEST 2015
ffmpeg | branch: master | Frank Heckenbach <f.heckenbach at fh-soft.de> | Sat Jul 4 00:48:47 2015 +0200| [161a301d44274645c2272855dac3e4664f935603] | committer: Luca Barbato
mpjpeg: Write the Content-length
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=161a301d44274645c2272855dac3e4664f935603
---
libavformat/mpjpeg.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list