summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* lavf/mov.c: Avoid heap allocation wraps in mov_read_{senc,saiz}()Matt Wolenetz2017-02-10
| | | | | | | | Core of patch is from paul@paulmehta.com Reference https://crbug.com/643952 (senc,saiz portions) Signed-off-by: Matt Wolenetz <wolenetz@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/mov.c: Avoid OOB in mov_read_udta_string()Matt Wolenetz2017-02-10
| | | | | | | | Core of patch is from paul@paulmehta.com Reference https://crbug.com/643952 (udta_string portion) Signed-off-by: Matt Wolenetz <wolenetz@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/mov.c: Avoid heap allocation wrap in mov_read_uuidMatt Wolenetz2017-02-08
| | | | | | | | | Core of patch is from paul@paulmehta.com Reference https://crbug.com/643951 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Check value reduced as the code does not support values beyond INT_MAX Also the check is moved to a more common place and before integer truncation
* lavf/mov.c: Avoid heap allocation wrap in mov_read_hdlrMatt Wolenetz2017-02-08
| | | | | | | | Core of patch is from paul@paulmehta.com Reference https://crbug.com/643950 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Check value reduced as the code does not support larger lengths
* matroska: demux BluRay text subtitlesPetri Hintukainen2017-02-07
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/hlsenc: add hls_flag option to write segments to temporary file ↵Aman Gupta2017-02-07
| | | | | | | | | | | | | | | | until complete Adds a `-hls_flags +temp_file` which will write segment data to filename.tmp, and then rename to filename when the segment is complete. This patch is similar in spirit to one used in Plex's ffmpeg fork, and allows a transcoding webserver to ensure incomplete segment files are never served up accidentally. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Bodecs Bela <bodecsb@vivanet.hu> Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/matroskadec: fix is_keyframe for early BlocksChris Cunningham2017-02-06
| | | | | | | | | | | | | | | Blocks are marked as key frames whenever the "reference" field is zero. This breaks for non-keyframe Blocks with a reference timestamp of zero. The likelihood of reference timestamp being zero is increased by a longstanding bug in muxing that encodes reference timestamp as the absolute time of the referenced frame (rather than relative to the current Block timestamp, as described in MKV spec). Now using INT64_MIN to denote "no reference". Reported to chromium at http://crbug.com/497889 (contains sample)
* avformat/segment: remove last_cut check when detecting a new segmentMarton Balint2017-02-04
| | | | | | | | | Not starting a new segment if the elapsed microsecs since the start of the day equals the the elapsed microsecs since the start of the day at the time of the last cut seems plain wrong to me, Deti do you remember the original reason behind this check? Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/isom: Support DTS Express in mov.Carl Eugen Hoyos2017-02-03
| | | | Fixes ticket #6124.
* Merge commit '7f549b8338ed3775fec4bf10421ff5744e5866dd'Clément Bœsch2017-02-02
|\ | | | | | | | | | | | | | | | | * commit '7f549b8338ed3775fec4bf10421ff5744e5866dd': riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data. Only cosmetics, the change was already present. Merged-by: Clément Bœsch <cboesch@gopro.com>
| * riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain ↵Hendrik Leppkes2016-07-22
| | | | | | | | | | | | | | | | | | | | | | | | | | that data. According to the specification on the MSDN [1], 0 is valid for that particular field, and it should be ignored in that case. [1]: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx Bug-Id: 950 Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * mov: Rework the check for invalid indexes in stscVittorio Giovara2016-07-20
| | | | | | | | | | | | | | | | | | | | There are samples with invalid stsc that may work fine as is and do not need extradata change. So ignore any out of range index, and error out only when explode is set. Found-by: Matthieu Bouron <matthieu.bouron@stupeflix.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avformat/msf: support codec 1, which is 16 bit pcm lePaul B Mahol2017-02-01
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '90bc423212396e96a02edc1118982ab7f7766a63'Clément Bœsch2017-02-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '90bc423212396e96a02edc1118982ab7f7766a63': mov: Wrap stsc index and count compare in a separate function The mov_stsc_index_valid() function is replaced with a macro to prevent signdness issues (index is not always signed, and count is always unsigned currently). The comparison is also adjusted to reduce the risk of overflows. Merged-by: Clément Bœsch <u@pkh.me>
| * mov: Wrap stsc index and count compare in a separate functionVittorio Giovara2016-07-20
| |
| * mov: Fix stsc_count comparisonMatthieu Bouron2016-07-20
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * mp3enc: write trailing paddingAnton Khirnov2016-07-15
| |
| * mp3dec: read the initial/trailing padding from the LAME tagAnton Khirnov2016-07-15
| |
| * mov: fix stream extradata_size allocationMatthieu Bouron2016-07-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | mov: fix decryption with edit listerankor2017-02-01
| | | | | | | | | | | | | | | | | | | | Retain the ranges of frame indexes when applying edit list in mov_fix_index. The index ranges are then used to keep track of the frame index of the current sample. In case of a discontinuity in frame indexes due to edit, update the auxiliary info position accordingly. Reviewed-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | boadec: remove log messagesAndreas Cadhalpun2017-02-01
| | | | | | | | | | Requested-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | lavf/xwma: fix incorrect format specifierMoritz Barsnick2017-01-31
| | | | | | | | Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* | avformat/avienc: add reserve_index_space optionTobias Rapp2017-01-31
| | | | | | | | | | | | | | | | | | | | Allows the user to reserve space for the ODML master index. A sufficient sized master index in the AVI header avoids storing follow-up master indexes within the 'movi' data later. If the option is omitted or zero the index size is estimated from output duration and bitrate. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | ircamdec: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-31
| | | | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/mov: Fix integer truncation in mov_read_uuid()Michael Niedermayer2017-01-30
| | | | | | | | | | | | Fixes Ticket6102 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/msf: fix codec 4 (joint stereo ATRAC3) and alignbnnm2017-01-30
| | | | | | | | | | | | | | | | | | Codec 4 (frame size 98) uses joint stereo per spec and examples. Also removed an incorrect "align" var which wasn't used anyway (it was overwrittern). Probably all/only .AT3 of frame size 98 are JS, too. Signed-off-by: bnnm <bananaman255@gmail.com>
* | avformat/Makefile: fix compilation of testprogs when networking is disabledTobias Rapp2017-01-30
| | | | | | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* | avformat: add SCC muxerPaul B Mahol2017-01-30
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/sccdec: simplify 2 sscanf callsPaul B Mahol2017-01-30
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | xvag: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-30
| | | | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | epafdec: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-30
| | | | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | genh: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-30
| | | | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | boadec: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-29
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | pvfdec: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-29
| | | | | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | electronicarts: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-29
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | 4xm: prevent overflow during block alignment calculationAndreas Cadhalpun2017-01-29
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/ac3dec: Fix to prevent runaway ac3 detection by looking at the ↵Marijn Meijles2017-01-28
| | | | | | | | | | | | | | | | | | actual frame rather than the first detected frame. When detecting a swapped AC3 marker the data of the frame is swapped. However, in subsequent frames the data swapped is taken from the first frame rather than the current frame. Signed-off-by: Marijn Meijles <marijn@bitpit.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: Ignore ID3v2 tags if other tags are present e.g. vorbisPaul Arzelier2017-01-28
| | | | | | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/matroskaenc: don't reserve more bytes than needed for the Colour ↵James Almer2017-01-28
| | | | | | | | | | | | | | master size Found-by: Aaron Colwell <acolwell@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/sccdec: attempt to fix valgrind issuePaul B Mahol2017-01-28
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat: fix ID3v2 parser for v2.2 comment framesChris Moeller2017-01-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | mov: Fix spherical metadata_source parsingAaron Colwell2017-01-27
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | lavf/matroskaenc.c: Free dyn bufs in mkv_free. Fixes memory leaks when ↵Sasi Inguva2017-01-27
| | | | | | | | | | | | | | muxing fails. Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/img2dec: Reduce the probe score for incomplete jpgs.Carl Eugen Hoyos2017-01-27
| | | | | | | | Ensures that probing doesn't finish prematurely for small files.
* | avformat/matroskadec: ProjectionPrivate is optional on Equirectangular ↵James Almer2017-01-26
| | | | | | | | | | | | | | | | projections This reflects a recent change to the spec draft. Signed-off-by: James Almer <jamrial@gmail.com>
* | tcp: set socket buffer sizes before listen/connect/acceptJoel Cunningham2017-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From e24d95c0e06a878d401ee34fd6742fcaddeeb95f Mon Sep 17 00:00:00 2001 From: Joel Cunningham <joel.cunningham@me.com> Date: Mon, 9 Jan 2017 13:37:51 -0600 Subject: [PATCH] tcp: set socket buffer sizes before listen/connect/accept Attempting to set SO_RCVBUF and SO_SNDBUF on TCP sockets after connection establishment is incorrect and some stacks ignore the set call on the socket at this point. This has been observed on MacOS/iOS. Windows 7 has some peculiar behavior where setting SO_RCVBUF after applies only if the buffer is increasing from the default while decreases are ignored. This is possibly how the incorrect usage has gone unnoticed Unix Network Programming Vol. 1: The Sockets Networking API (3rd edition, seciton 7.5): "When setting the size of the TCP socket receive buffer, the ordering of the function calls is important. This is because of TCP's window scale option, which is exchanged with the peer on SYN segments when the connection is established. For a client, this means the SO_RCVBUF socket option must be set before calling connect. For a server, this means the socket option must be set for the listening socket before calling listen. Setting this option for the connected socket will have no effect whatsoever on the possible window scale option because accept does not return with the connected socket until TCP's three-way handshake is complete. This is why the option must be set on the listening socket. (The sizes of the socket buffers are always inherited from the listening socket by the newly created connected socket)" Signed-off-by: Joel Cunningham <joel.cunningham@me.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/flacdec: Check avio_read result when reading flac block header.Frank Liberato2017-01-25
| | | | | | | | | | | | Return AVERROR_INVALIDDATA if all four bytes aren't present. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: add Scenarist Closed Captions demuxerPaul B Mahol2017-01-25
| | | | | | | | | | | | Fixes #4767. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat: add Sample Dump eXchange demuxerPaul B Mahol2017-01-25
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavf/mov: Unscramble dref debug output.Carl Eugen Hoyos2017-01-25
| |