summaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
* lavf/matroskadec: Get sample size from private dataMats Peterson2016-01-161-2/+8
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/mov: Don't limit fourcc 0 -> raw/twos to version 0 sample descriptionsMats Peterson2016-01-161-1/+1
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/riff: add C210 FourCC (Canopus C210)Piotr Bandurski2016-01-151-0/+1
|
* avformat/riff: add YUYV FourCC (Drastic YUYV)Piotr Bandurski2016-01-151-0/+1
|
* avformat/hls: Even stricter URL checksMichael Niedermayer2016-01-151-1/+5
| | | | | | This fixes a null pointer dereference at least Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/hls: More strict url checksMichael Niedermayer2016-01-151-0/+4
| | | | | | No case is known where these are needed Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/rmdec: add missing av_log argumentJames Almer2016-01-151-1/+1
| | | | | | Also change the format specifier to expect an unsigned int Signed-off-by: James Almer <[email protected]>
* lavf/mov: Confine 0x00000000 to raw/twos fourcc mapping to version 0 sample ↵Mats Peterson2016-01-151-1/+1
| | | | | | | | | | descriptions Confine the 0x00000000 to 'raw '/'twos' fourcc mapping to old version 0 sound sample descriptions, since they are the only valid sample descriptions for this type of mapping. Signed-off-by: Michael Niedermayer <[email protected]>
* asfdec_o: check for too small size in asf_read_unknownAndreas Cadhalpun2016-01-151-1/+6
| | | | | | | This fixes infinite loops due to seeking back. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: break if EOF is reached after asf_read_packet_headerAndreas Cadhalpun2016-01-151-0/+2
| | | | | | | | | | asf_read_payload can unset eof_reached, so check it also before calling that function. This fixes infinite loops. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: make sure packet_size is non-zero before seekingAndreas Cadhalpun2016-01-151-0/+4
| | | | | | | This fixes infinite loops due to seeking back. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: prevent overflow causing seekbackAndreas Cadhalpun2016-01-151-1/+1
| | | | | | | This fixes infinite loops. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: check avio_skip in asf_read_simple_indexAndreas Cadhalpun2016-01-151-2/+6
| | | | | | | The loop can be very long, even though the file is very short. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: reject size > INT64_MAX in asf_read_unknownAndreas Cadhalpun2016-01-151-0/+3
| | | | | | | | | | Both avio_skip and detect_unknown_subobject use int64_t for the size parameter. This fixes a segmentation fault due to infinite recursion. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* asfdec_o: only set asf_pkt->data_size after sanity checksAndreas Cadhalpun2016-01-151-8/+10
| | | | | | | | Otherwise invalid values are used unchecked in the next run. This can cause NULL pointer dereferencing. Reviewed-by: Alexandra Hájková <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* avformat/rmdec: Fix Packet memleak at close()Michael Niedermayer2016-01-141-0/+1
| | | | | | | Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/rmdec: Check size in ivr_read_packet() before useMichael Niedermayer2016-01-141-0/+5
| | | | | | | | Fixes out of array access Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/hls: forbid all protocols except http(s) & fileMaxim Andreev2016-01-141-0/+4
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/aviobuf: Fix end check in put_str16()Michael Niedermayer2016-01-131-0/+2
| | | | | | | | Fixes out of array read Fixes: 03c406ec9530e594a074ce2979f8a1f0/asan_heap-oob_7dec26_4664_37c52495b2870a2eaac65f53958e76c1.flac Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/mpjpegdec: Do not call av_log() while probing.Carl Eugen Hoyos2016-01-121-0/+3
|
* avformat/asfenc: Check ptsMichael Niedermayer2016-01-121-0/+5
| | | | | | | | Fixes integer overflow Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/asfenc: Flush packet before duration becomes unrepresentableMichael Niedermayer2016-01-121-0/+5
| | | | | | | | Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/matroskadec: Use av_realloc() in get_qt_codec()Mats Peterson2016-01-121-3/+3
| | | | | | | Use av_realloc() rather than av_malloc() when normalizing noncompliant private data in get_qt_codec(). Signed-off-by: Michael Niedermayer <[email protected]>
* rtmpdh: Initialize gcrypt before using itRicardo Constantino2016-01-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | Either disabling or init'ing secure memory is required after the use of gcry_check_version. From a look at the functions rtmpdh uses, I noticed none require the use of secure memory, so we disable it [1][2]. This resolves some errors returned by rtmpdh code with uninitialized gcrypt, especifically: Fatal: failed to create the RNG lock: Invalid argument FATAL: failed to acquire the FSM lock in libgrypt: Invalid argument Version "1.5.4" was arbitrarily chosen. An older version probably works as well, but I couldn't compile older versions to test on my machine. [1] https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html [2] https://www.gnupg.org/documentation/manuals/gcrypt/Controlling-the-library.html Signed-off-by: Ricardo Constantino <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* ffmdec: change type of len to ptrdiff_tAndreas Cadhalpun2016-01-111-2/+3
| | | | | | | | | | It is used to store the difference between pointers, so ptrdiff_t is the correct type. This prevents potential overflows. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* qtpalette: make the color_* variables unsigned againAndreas Cadhalpun2016-01-111-1/+1
| | | | | | | | | | This fixes segmentation faults due to out of bounds writes, when color_start is interpreted as negative number. This regression was introduced in commit 57631f. Reviewed-by: Mats Peterson <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* avformat/dfa: Fix packet leak on errorMichael Niedermayer2016-01-111-0/+1
| | | | | | | Fixes: 07fa81f300736485e585b63e7b1cd155/signal_sigabrt_7ffff6ae7cb7_16_94ee815791a1357826524072db5bc2dc.dfa Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/matroskadec: Normalize noncompliant A_QUICKTIME/V_QUICKTIME private dataMats Peterson2016-01-111-13/+35
| | | | | | | | | | | | | This patch adds a new static function get_qt_codec() that takes care of the initial retrieval of the fourcc and codec ID for A_QUICKTIME and V_QUICKTIME. It also normalizes noncompliant private data found in some older files that incorrectly starts with the fourcc by expanding/shifting the data by 4 bytes, and storing the data size at the start. This is necessary in order for the rest of the code in the A_QUICKTIME and V_QUICKTIME blocks (and most likely other code as well) to correctly parse the private data. Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/concatdec: do not access packet if av_read_frame returned errorMarton Balint2016-01-101-3/+7
| | | | | Reviewed-by: Nicolas George <[email protected]> Signed-off-by: Marton Balint <[email protected]>
* avformat: Add integer fps from 31 to 60 to get_std_framerate()Michael Niedermayer2016-01-092-4/+8
| | | | | | Fixes Ticket 5106 Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/movenc: Check that pkt duration is within 32bit rangeMichael Niedermayer2016-01-091-4/+4
| | | | | | | Durations outside are not supported Fixes Ticket5114 Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/ivfenc: fix division by zeroMichael Niedermayer2016-01-081-2/+3
| | | | | | Fixes Ticket 5115 Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Simplify format checking codeMichael Niedermayer2016-01-081-9/+2
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/matroskadec: A_QUICKTIME and fourcc 0x00000000Mats Peterson2016-01-081-0/+9
| | | | | | | | | | | | | | | In many older QuickTime files, the audio format, or "fourcc", is 0x00000000. The QuickTime File Format Specification states the following regarding this situation: "This format descriptor should not be used, but may be found in some files. Samples are assumed to be stored in either 'raw ' or 'twos' format, depending on the sample size field in the sound description." MPlayer handles this logic by itself, but FFmpeg/FFplay currently does not. Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/mov: Audio and fourcc 0x00000000Mats Peterson2016-01-081-1/+15
| | | | | | | | | | | | | | | In many older QuickTime files, the audio format, or "fourcc", is 0x00000000. The QuickTime File Format Specification states the following regarding this situation: "This format descriptor should not be used, but may be found in some files. Samples are assumed to be stored in either 'raw ' or 'twos' format, depending on the sample size field in the sound description." MPlayer handles this logic by itself, but FFmpeg/FFplay currently does not. Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/uncodedframecrcenc: use FF_CEIL_RSHIFT()Clément Bœsch2016-01-071-1/+1
|
* lavf/matroskadec: correct codec_tag for "SMI" SVQ3 filesMats Peterson2016-01-061-2/+4
| | | | | | This corrects the codec_tag for some SVQ3 files Signed-off-by: Michael Niedermayer <[email protected]>
* lavf/matroskaenc: Assume 48kHz sample rate for Opus initial padding.Carl Eugen Hoyos2016-01-052-2/+2
| | | | | Analyzed by Timothy B. Terriberry in Mozilla bug 1227153. Fixes ticket #5121.
* brstm: fix missing closing braceAndreas Cadhalpun2016-01-041-0/+1
| | | | Signed-off-by: Andreas Cadhalpun <[email protected]>
* brstm: also allocate b->table in read_packetAndreas Cadhalpun2016-01-041-0/+4
| | | | | | | | This fixes NULL pointer dereferencing if the codec is forced to adpcm_thp even though a different one was detected. Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* brstm: make sure an ADPC chunk was read for adpcm_thpAndreas Cadhalpun2016-01-041-0/+5
| | | | | | | This fixes NULL pointer dereferencing. Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* lavf/qtpalette: Ignore greyscale bit in certain casesMats Peterson2016-01-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QuickTime File Format Specification states the following: "Depth: A 16-bit integer that indicates the pixel depth of the compressed image. Values of 1, 2, 4, 8 ,16, 24, and 32 indicate the depth of color images. The value 32 should be used only if the image contains an alpha channel. Values of 34, 36, and 40 indicate 2-, 4-, and 8-bit grayscale, respectively, for grayscale images." There is no mention of value 33, i.e. 1-bit video (0x01) with the greyscale bit (0x20) set. I therefore suggest that we ignore the greyscale bit when processing 1-bit video. Another reason to do this is that the first 1-bit sample file below will be displayed properly with blue colors in QuickTime in Windows or Mac *in spite of* the greyscale bit being set. Also, QuickTime in Windows or Mac ignores the greyscale bit if the video sample description contains a palette, regardless of bit depth. This is undocumented behaviour, but I think we should do the same, and it seems pretty logical after all, since one wouldn't really bother putting a customized palette into a grayscale file anyway. See the second 8-bit sample file below, which has the greyscale bit set, and which contains a palette in the video sample description. In Windows or Mac, it will be displayed with the palette in the sample description, in spite of the greyscale bit being set. Sample file 1 (1-bit QuickTime Animation): https://drive.google.com/open?id=0B3_pEBoLs0faTThSek1EeXQ0ZHM Earth Spin 1-bit qtrle orig.mov Sample file 2 (8-bit QuickTime Animation): https://drive.google.com/open?id=0B3_pEBoLs0fad2s0V1YzUWo5aDA quiz-palette+gs.mov Signed-off-by: Michael Niedermayer <[email protected]>
* ffmdec: reset packet_end in case of failureAndreas Cadhalpun2016-01-031-3/+6
| | | | | | | | This fixes segmentation faults caused by passing a packet_ptr of NULL to memcpy. Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* avformat/ffmdec: Add {} to nested if/elseMichael Niedermayer2016-01-031-3/+4
| | | | | | | This preempts potential bugs if this is changed and the indention ends up different from C interpretation Signed-off-by: Michael Niedermayer <[email protected]>
* ffmdec: change type of state and id to unsignedAndreas Cadhalpun2016-01-021-2/+3
| | | | | | | | This fixes ubsan runtime error: left shift by 8 places cannot be represented in type 'int' Reviewed-by: Michael Niedermayer <[email protected]> Signed-off-by: Andreas Cadhalpun <[email protected]>
* Merge commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1'Hendrik Leppkes2016-01-022-3/+3
|\ | | | | | | | | | | | | * commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1': Remove stray line breaks from avpriv_{report_missing_feature|request_samples} Merged-by: Hendrik Leppkes <[email protected]>
| * Remove stray line breaks from avpriv_{report_missing_feature|request_samples}Diego Biurrun2015-12-262-3/+3
| |
* | Merge commit '5049f6b772891cdf4030a9d572362efc8f7ae97f'Hendrik Leppkes2016-01-021-6/+0
|\| | | | | | | | | | | | | * commit '5049f6b772891cdf4030a9d572362efc8f7ae97f': rtpdec_jpeg: Coalesce redundant error checks Merged-by: Hendrik Leppkes <[email protected]>
| * rtpdec_jpeg: Coalesce redundant error checksDiego Biurrun2015-12-261-6/+0
| |
| * mpegtsenc: add flag to embed an AC-3 ES the DVB wayStefan Pöschel2015-12-141-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | So far an AC-3 elementary stream is refered to in the PMT according to System A (ATSC). However System B (DVB) has a different way to signal an AC-3 ES within the PMT. This different way can be enabled by a new flag. The flag is more generally named 'system_b' as there are further differences between ATSC and DVB (e.g. the signalling of E-AC-3) which should then also be covered by it in the future. Bug-Id: 73 Signed-off-by: Luca Barbato <[email protected]>