summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavf/mpjpegdec: Mark local variable staticMark Thompson2018-06-251-1/+1
|
* Use the new AVIOContext destructor.Anton Khirnov2017-09-011-1/+1
| | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2016-03-091-1/+1
| |
* | avformat/mpjpegdec: add AVFMT_NOTIMESTAMPSMichael Niedermayer2016-02-211-1/+2
| | | | | | | | | | | | there are no timestamps being set, thus do not attempt to collect any Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mpjpeg: probe should not depend on Content-Length MIME header being presentAlex Agranovsky2016-02-211-1/+1
| | | | | | | | | | Signed-off-by: Alex Agranovsky <alex@sighthound.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned ↵Alex Agranovsky2016-02-141-2/+2
| | | | | | | | | | | | | | frame Signed-off-by: Alex Agranovsky <alex@sighthound.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mpjpeg: Trim quotes on MIME boundary, if present.Alex Agranovsky2016-02-141-0/+7
| | | | | | | | | | | | | | Fixes 5023 Signed-off-by: Alex Agranovsky <alex@sighthound.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mpjpegdec: Do not call av_log() while probing.Carl Eugen Hoyos2016-01-121-0/+3
| |
* | lavf/mpjpegdec: Fixed dereference after null checkAlex Agranovsky2015-12-091-2/+4
| | | | | | | | | | | | Fixes Coverity CID 1341576 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-041-1/+1
| |
* | avformat/mpjpegdec: Fix "libavformat/mpjpegdec.c:269:9: warning: passing ↵Michael Niedermayer2015-12-041-2/+2
| | | | | | | | | | | | argument 3 of av_stristart from incompatible pointer type" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mpjpegdec: fix mixed declarations and codeJames Almer2015-12-031-2/+6
| |
* | avformat/mpjpeg: utilize MIME boundary value to detect start of new frameAlex Agranovsky2015-12-021-3/+69
| | | | | | | | | | | | 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>
* | avformat/mpjpeg: allow processing of MIME parts without Content-Length headerAlex Agranovsky2015-12-021-43/+125
| | | | | | | | | | | | Fixes ticket 5023 Signed-off-by: Alex Agranovsky <alex@sighthound.com>
* | Merge commit '18f9308e6a96bbeb034ee5213a6d41e0b6c2ae74'Hendrik Leppkes2015-10-271-3/+10
|\ \ | |/ | | | | | | | | | | * commit '18f9308e6a96bbeb034ee5213a6d41e0b6c2ae74': mpjpeg: Cope with multipart lacking the initial CRLF Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * mpjpeg: Cope with multipart lacking the initial CRLFLuca Barbato2015-10-231-3/+10
| | | | | | | | | | | | | | | | | | 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
* | lavf/mpjpegdec: Return 0 if an allocation inside the probe function fails.Carl Eugen Hoyos2015-10-221-1/+1
| |
* | mpjpeg: CRLF terminating a sequence of MIME headers should not cause an errorAlex Agranovsky2015-09-211-2/+13
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mpjpegdec: silence unused variable/function warningsGanesh Ajjanagadde2015-09-161-16/+0
| | | | | | | | | | | | Silences a -Wunused-variable and -Wunused-function observed under GCC 5.2. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avformat: fix style after recent commitsClément Bœsch2015-09-141-5/+5
| |
* | mpjpegde: trim header name/value of MIME headersAlex Agranovsky2015-09-141-0/+15
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | mpjpeg: probe should require same constraints as packet reader - both proper ↵Alex Agranovsky2015-09-141-19/+14
| | | | | | | | | | | | | | | | 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>
* | avformat/mpjpegdec: Allow mpjpeg headers parsing to succeed upon EOF, if ↵Alex Agranovsky2015-09-131-1/+4
| | | | | | | | | | | | required headers are present Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc'Michael Niedermayer2015-06-281-0/+2
|\ \ | |/ | | | | | | | | | | * commit '8a26ae5f94e613dbf7eb8e3c60462e966e409cdc': mpjpeg: Check stream allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpjpeg: Check stream allocationLuca Barbato2015-06-281-0/+2
| | | | | | | | Bug-Id: CID 1308152
| * mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to failJames Almer2015-06-091-4/+4
| | | | | | | | | | | | | | 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>
* | mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to failJames Almer2015-06-081-4/+3
| | | | | | | | | | | | | | 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>
* | Merge commit 'caf7be30b11288c498fae67be4741bfbf083d977'Michael Niedermayer2015-06-081-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'caf7be30b11288c498fae67be4741bfbf083d977': mpjpgdec: free AVIOContext leak on early probe fail Conflicts: libavformat/mpjpegdec.c See: 34d278f9838e355b3b2c7a9c0f77d7fcaf37ce49, this was mistakenly reimplemented, also see ffmpeg IRC log of today Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpjpgdec: free AVIOContext leak on early probe failJanne Grunau2015-06-081-2/+2
| |
* | mpjpegdec: fix memory leak in probe functionJames Almer2015-06-081-1/+2
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '9b56ac74b170d12027fbc81f581a451a709f1105'Michael Niedermayer2015-06-081-4/+4
|/ | | | | | | | | | | | * commit '9b56ac74b170d12027fbc81f581a451a709f1105': mpjpeg: Initial implementation Conflicts: Changelog libavformat/allformats.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* mpjpeg: Initial implementationLuca Barbato2015-06-071-0/+223
Support only streams with Content-Length. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>