[FFmpeg-cvslog] rawdec: fix mjpeg probing

wm4 git at videolan.org
Thu Aug 20 14:53:50 CEST 2015


ffmpeg | branch: release/2.4 | wm4 <nfxjfg at googlemail.com> | Wed Jul 29 22:11:18 2015 +0200| [2d582d142c185fbf7bc9240903423c9bbac7784f] | committer: Michael Niedermayer

rawdec: fix mjpeg probing

There can be other headers than "Content-Type:" (in this case, a
"Content-Length:" header was following), so checking for a trailing
newline is wrong.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit bf51fcd304d5594a4d8eed2bedf0ef0f68fa65f8)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d582d142c185fbf7bc9240903423c9bbac7784f
---

 libavformat/rawdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index ca9b282..19bdfc3 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -186,7 +186,7 @@ static int mjpeg_probe(AVProbeData *p)
     }
 
     if (nb_invalid*4 + 1 < nb_frames) {
-        static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n\r\n";
+        static const char ct_jpeg[] = "\r\nContent-Type: image/jpeg\r\n";
         int i;
 
         for (i=0; i<FFMIN(p->buf_size - sizeof(ct_jpeg), 100); i++)



More information about the ffmpeg-cvslog mailing list