aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2017-05-10 23:57:20 +0300
committerMartin Storsjö <martin@martin.st>2017-05-11 11:05:42 +0300
commit6ccf76aec73b2cd598bb1e65d126d8a12540c411 (patch)
tree03bb2c55f7908b5b22aa99530322b5322e70da1c
parentcb167f2947f1a2c446bd8db196d0e64ef4a6d06b (diff)
downloadffmpeg-6ccf76aec73b2cd598bb1e65d126d8a12540c411.tar.gz
mpjpeg: Use proper CR/LF in multipart headers
This is more correct. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/mpjpeg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index 1a78c32274..3b78cab225 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -26,7 +26,7 @@
static int mpjpeg_write_header(AVFormatContext *s)
{
- avio_printf(s->pb, "--%s\n", BOUNDARY_TAG);
+ avio_printf(s->pb, "--%s\r\n", BOUNDARY_TAG);
avio_flush(s->pb);
return 0;
}
@@ -34,12 +34,12 @@ static int mpjpeg_write_header(AVFormatContext *s)
static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_printf(s->pb,
- "Content-length: %i\n"
- "Content-type: image/jpeg\n\n",
+ "Content-length: %i\r\n"
+ "Content-type: image/jpeg\r\n\r\n",
pkt->size);
avio_write(s->pb, pkt->data, pkt->size);
- avio_printf(s->pb, "\n--%s\n", BOUNDARY_TAG);
+ avio_printf(s->pb, "\r\n--%s\r\n", BOUNDARY_TAG);
return 0;
}