Carl Eugen Hoyos
405abdbaee
lavf/mpjpegdec: Do not call av_log() while probing.
9 years ago
Alex Agranovsky
7fd1c85e51
lavf/mpjpegdec: Fixed dereference after null check
...
Fixes Coverity CID 1341576
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
43ecec0f03
avformat: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Michael Niedermayer
9696a01f12
avformat/mpjpegdec: Fix "libavformat/mpjpegdec.c:269:9: warning: passing argument 3 of av_stristart from incompatible pointer type"
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
James Almer
9ac5beaa86
avformat/mpjpegdec: fix mixed declarations and code
9 years ago
Alex Agranovsky
259c71c199
avformat/mpjpeg: utilize MIME boundary value to detect start of new frame
...
This code is disabled by default so not to regress endpoints sending invalid MIME, but can be enabled via AVOption 'strict_mime_boundary'
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
9 years ago
Alex Agranovsky
79103f2199
avformat/mpjpeg: allow processing of MIME parts without Content-Length header
...
Fixes ticket 5023
Signed-off-by: Alex Agranovsky <alex@sighthound.com>
9 years ago
Luca Barbato
18f9308e6a
mpjpeg: Cope with multipart lacking the initial CRLF
...
Some server in the wild do not put the boundary at a newline
as rfc1347 7.2.1 states.
Cope with that by reading a line and if it is not empty reading
a second one.
Reported-By: bitingsock
9 years ago
Carl Eugen Hoyos
c52c78cc56
lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails.
9 years ago
Alex Agranovsky
53e8bef25a
mpjpeg: CRLF terminating a sequence of MIME headers should not cause an error
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
9aaa54135c
avformat/mpjpegdec: silence unused variable/function warnings
...
Silences a -Wunused-variable and -Wunused-function observed under GCC 5.2.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Clément Bœsch
c8370a17f5
avformat: fix style after recent commits
9 years ago
Alex Agranovsky
1de21215d4
mpjpegde: trim header name/value of MIME headers
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Alex Agranovsky
0572bd1a62
mpjpeg: probe should require same constraints as packet reader - both proper content-type and content-size must be present
...
return AVPROBE_SCORE_MAX, rather than random positive number on success
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Alex Agranovsky
276ab7c148
avformat/mpjpegdec: Allow mpjpeg headers parsing to succeed upon EOF, if required headers are present
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
8a26ae5f94
mpjpeg: Check stream allocation
...
Bug-Id: CID 1308152
10 years ago
James Almer
b380337020
mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail
...
The first check is done without the AVIOContext, so alloc it only if said check succeeds
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years ago
James Almer
1382add59d
mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail
...
The first check is done without the AVIOContext, so alloc it only if said check succeeds
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
34d278f983
mpjpegdec: fix memory leak in probe function
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Janne Grunau
caf7be30b1
mpjpgdec: free AVIOContext leak on early probe fail
10 years ago
Luca Barbato
9b56ac74b1
mpjpeg: Initial implementation
...
Support only streams with Content-Length.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago