Browse Source

mpjpeg: Write the Content-length

tags/n2.8
Frank Heckenbach Luca Barbato 10 years ago
parent
commit
161a301d44
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/mpjpeg.c

+ 4
- 1
libavformat/mpjpeg.c View File

@@ -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);


Loading…
Cancel
Save