Merge commit '161a301d44274645c2272855dac3e4664f935603'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Jul 2015 22:10:20 +0000 (00:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Jul 2015 22:11:32 +0000 (00:11 +0200)
* commit '161a301d44274645c2272855dac3e4664f935603':
  mpjpeg: Write the Content-length

Conflicts:
libavformat/mpjpeg.c

See: 0d2f4eedc8a46892471c51cbc7a78cd9a489771a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavformat/mpjpeg.c

@@@ -40,12 -33,13 +40,13 @@@ static int mpjpeg_write_header(AVFormat
  
  static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
  {
 -    avio_printf(s->pb,
 -                "Content-length: %i\n"
 -                "Content-type: image/jpeg\n\n",
 +    MPJPEGContext *mpj = s->priv_data;
 +    avio_printf(s->pb, "Content-type: image/jpeg\r\n");
-     avio_printf(s->pb, "Content-length: %d\r\n\r\n", pkt->size);
++    avio_printf(s->pb, "Content-length: %d\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", mpj->boundary_tag);
      return 0;
  }