Package: libav-tools
Version: 6:11.4-1~deb8u1
Severity: wishlist
Tags: upstream patch

I suggest to add a Content-Length header to the mpjpeg output. This
makes it easier to parse the output, rather than relying on the
fixed boundary which, though very unlikely, could also occur within
an image. Since the size information is readily available, it's a
trivial change:

--- libav-0.8.17/libavformat/mpjpeg.c
+++ libav-0.8.17/libavformat/mpjpeg.c
@@ -38,7 +38,8 @@
 {
     uint8_t buf1[256];
 
-    snprintf(buf1, sizeof(buf1), "Content-type: image/jpeg\n\n");
+    snprintf(buf1, sizeof(buf1),
+             "Content-type: image/jpeg\nContent-length: %i\n\n", pkt->size);
     avio_write(s->pb, buf1, strlen(buf1));
     avio_write(s->pb, pkt->data, pkt->size);
 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to