summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/mms: Add missing chunksize checkMichael Niedermayer2018-07-06
| | | | | | | | | | Fixes: out of array read Fixes: mms-crash-01b6c5d85f9d9f40f4e879896103e9f5b222816a Found-by: Paul Ch <paulcher@icloud.com> 1st hunk by Paul Ch <paulcher@icloud.com> Tested-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/pva: Check for EOF before retrying in read_part_of_packet()Michael Niedermayer2018-07-05
| | | | | | | | Fixes: Infinite loop Fixes: pva-4b1835dbc2027bf3c567005dcc78e85199240d06 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rmdec: Do not pass mime type in rm_read_multi() to ↵Michael Niedermayer2018-07-05
| | | | | | | | | | ff_rm_read_mdpr_codecdata() Fixes: use after free() Fixes: rmdec-crash-ffe85b4cab1597d1cfea6955705e53f1f5c8a362 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/asfdec_o: Check size_bmp more fullyMichael Niedermayer2018-07-05
| | | | | | | | Fixes: integer overflow and out of array access Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: Fix av_log contextMichael Niedermayer2018-07-05
| | | | | | | | Fixes: out of array access Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: add support for opAtom without indexMarton Balint2018-07-04
| | | | | | Clip wrapped code is capable of doing some magic for such files. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: guess constant byte count indexes based on track durationMarton Balint2018-07-04
| | | | | | | For clip wrapped essences this should work. Also, since index_edit_rate can now be different from track edit rate, remove overriding track edit rate. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: take into account index_edit_rateMarton Balint2018-07-04
| | | | | | | Fixes samples/ffmpeg-bugs/roundup/issue591/02785736.mxf Fixes samples/ffmpeg-bugs/trac/ticket1916/pcm_s24le_to_pcm_s16le.mxf Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: fix indentation and rename mxf_read_packet_oldMarton Balint2018-07-04
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for clip wrapped essencesMarton Balint2018-07-04
| | | | | | | | | | Also use common code with opAtom. Fixes ticket #2776. Partially fixes ticket #5671. Fixes ticket #5866. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: Expose encryption info to the app.Jacob Trimble2018-07-04
| | | | | | | | | | This exposes encryption info from the container to the app. This includes key ID, IV, and subsample byte ranges. The info is passed using the new side-data AV_PKT_DATA_ENCRYPTION_DATA and AV_PKT_DATA_ENCRYPTION_INIT_DATA. Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* riff: add ATRAC9 guidRostislav Pehlivanov2018-07-03
| | | | | | Enables demuxing of ATRAC9 files. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avformat/apngdec: set pts to AV_NOPTS_VALUEMarton Balint2018-07-02
| | | | | | | | | And let the generic code figure out the proper PTS. This is needed because apng does not provide seek functions, but after a generic seek (e.g. to file start) timestamps are not reset which causes broken timestamps when looping apngs, like in ticket #6121. Signed-off-by: Marton Balint <cus@passwd.hu>
* libavformat/yuv4mpeg: Add color range support for Y4M Add color_range ↵Wang Cao2018-06-30
| | | | | | | | | | support in Y4M. Set pixel format and color_range for YUVJ pixel formats. Also set color_range based on AVFormatContext. Signed-off-by: Wang Cao <wangcao@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Use mov->fc consistently for av_log()Michael Niedermayer2018-06-28
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sampleMichael Niedermayer2018-06-28
| | | | | | | | Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: Check that frame_types other than ↵Michael Niedermayer2018-06-28
| | | | | | | | | | EAC3_FRAME_TYPE_INDEPENDENT have a supported substream id Fixes: out of array access Fixes: ffmpeg_bof_1.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/amr: Fix heuristic to avoid detection of repeated bytes.Carl Eugen Hoyos2018-06-26
|
* lavf/mpjpegdec: Mark local variable staticMark Thompson2018-06-25
|
* avformat/mxfdec: avoid index_table->nb_ptses overflow in ↵Marton Balint2018-06-24
| | | | | | mxf_compute_ptses_fake_index Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: compute sample_count for all streams on seekMarton Balint2018-06-24
| | | | | | sample_count will be used for per-stream current_edit_unit. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for returning the partition for ↵Marton Balint2018-06-24
| | | | | | mxf_edit_unit_absolute_offset and mxf_absolute_bodysid_offset Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: make current_edit_unit a parameter of mxf_compute_samplesMarton Balint2018-06-24
| | | | | | No change in functionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: make edit_units_per_packet a track propertyMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: simply use the first essence element for non frame-wrapped ↵Marton Balint2018-06-24
| | | | | | | | | partition essence offset Also add the canopus essence element to the list of the recognized essence element keys. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: compute both essence_offset and essence_length in ↵Marton Balint2018-06-24
| | | | | | | | | mxf_compute_essence_containers Also compute the correct essence_offset and essence_length for all clip wrapped essences. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: extend mxf_handle_missing_index_segment for all clip ↵Marton Balint2018-06-24
| | | | | | | | | wrapped essences Also make sure we set a valid track index sid and a valid track edit rate in order for the index to be useful. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add some essence container uls from SMPTE draftMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for determining essence wrapping schemeMarton Balint2018-06-24
| | | | | | Some code is based on bmxlib-libmxf/mxf/mxf_utils.c. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: store next_klv in KLVPacketMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/amr: Make the heuristic for auto-detection even stricter.Carl Eugen Hoyos2018-06-22
| | | | Fixes ticket #7270.
* avformat/movenc: allow hdlr name field to be emptyGyan Doshi2018-06-21
| | | | | | Both QTFF and the ISOBMFF standards allow it. Fixes #7262
* lavf/mov: Do not fail hard for truncated stsz atoms.Carl Eugen Hoyos2018-06-19
| | | | Fixes ticket #6433.
* avformat/movenc: read track title from correct keyGyan Doshi2018-06-19
| | | | | | | | | | da9cc22d5bd allowed the MOV muxer to relay a custom stream handler name, whether populated from the input stream or user-set. However, the entry key didn't match the key set by the MOV demuxer, so it wasn't effective. Fixed. Due to the change, four FATE refs have to be updated. Verified that the target payload of the tests hasn't changed in terms of CRC.
* avformat/mpegts: parse large PMTs with multiple tablesAman Gupta2018-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 9152c1e4955, the mpegts parser was taught how to parse PMT sections which contained multiple tables. That commit fixed parsing of PMT packets from some cable providers, which included a special SCTE table (0xc0) before the standard program map table (0x2). Sometimes, however, the combined 0xc0 and 0x2 tables are larger than a single TS packet (188 bytes). The mpegts parser already attempts to parse sections which span multiple packets, but still assumed that the split section only contained one table. This patch fixes parsing of such a sample[1]. Before: Input #0, mpegts, from 'combined-pmt-tids-split.ts': Duration: 00:00:01.26, start: 39188.931756, bitrate: 597 kb/s Program 1 No Program Stream #0:0[0xeff]: Audio: ac3, 48000 Hz, mono, fltp, 64 kb/s Stream #0:1[0xefd]: Audio: mp3, 0 channels, fltp Stream #0:2[0xefe]: Unknown: none After: Input #0, mpegts, from 'combined-pmt-tids-split.ts': Duration: 00:00:01.27, start: 39188.931756, bitrate: 589 kb/s Program 1 Stream #0:0[0xefd]: Video: h264 ([27][0][0][0] / 0x001B), none, 59.94 fps, 59.94 tbr, 90k tbn, 180k tbc Stream #0:1[0xefe](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s Stream #0:2[0xeff](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, mono, fltp, 64 kb/s Stream #0:3[0xf00]: Data: scte_35 Stream #0:4[0xf01]: Unknown: none (ETV1 / 0x31565445) Stream #0:5[0xf02]: Unknown: none (ETV1 / 0x31565445) Stream #0:6[0xf03]: Unknown: none ([192][0][0][0] / 0x00C0) With the patch, the PMT is parsed correctly so the streams are created in the correct order, are associated with "Program 1", and their codecs are set correctly. [1] https://s3.amazonaws.com/tmm1/combined-pmt-tids-split.ts Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/tedcaptionsdec: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavf/icecast: Replace the number by macro for bprint initJun Zhao2018-06-17
| | | | | | Replace the number by macro for bprint init. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
* lavf/aviobuf: Increase Statistics verbosity to AV_LOG_VERBOSE.Carl Eugen Hoyos2018-06-16
|
* avformat/mov: Only set pkt->duration to non negative valuesMichael Niedermayer2018-06-14
| | | | | Reviewed-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: fix recognization of cover image streamsTimo Teräs2018-06-13
| | | | | | | | | | For chapter images, the mov demux produces streams with disposition set to attached_pic+timed_thumbnails. This patch fixes to properly recognize streams that should be encoded as cover image (ones with only and only attached_pic disposition set). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/movenc: properly handle cover image codecsTimo Teräs2018-06-13
| | | | | | | | | | | Find codec tag for attached images using appropriate list of supported image formats. This fixes writing the cover image to m4v/m4a and other container formats that do not allow these codecs as a track. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Add check for per-sample IV size.Jacob Trimble2018-06-13
| | | | | | | Found by Chrome's ClusterFuzz: http://crbug.com/849062. Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: deprecate unused MP4A_LATM flagGyan Doshi2018-06-13
| | | | | | | A generic lavf flag for AAC LATM packetization for the RTP muxer was added in ef409645f0 and then made inert 20 days later in 0832122880 when a private muxer option was added and the generic flag no longer read.
* avformat/mov: Fix reading saio/saiz for clear content.Jacob Trimble2018-06-09
| | | | | | | | | | | This validates that the common encryption saio/saiz atoms only appear when the data is actually encrypted. This also ignores those atoms in clear content. Found by Chrome's ClusterFuzz: http://crbug.com/850389 Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: add support for recognizing timed text streamsMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: remove check for NULL MXFTrack in mxf_set_ptsMarton Balint2018-06-08
| | | | | | It cannot happen for video streams. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: only disallow seek on metadata streamsMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: recognize SMPTE 436 VBI dataMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: use MXFCodecUL struct to store essence description for ↵Marton Balint2018-06-08
| | | | | | data_essence_container_uls Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/mov.c: Set st->start_time for video streams explicitly.Sasi Inguva2018-06-06
| | | | | | | If start_time is not set, ffmpeg takes the duration from the global movie instead of the per stream duration. Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>