summaryrefslogtreecommitdiffstats
path: root/libavformat/matroskadec.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/matroskadec: reference the existing data buffer when creating packetsJames Almer2018-04-061-18/+27
| | | | | | | | | | Newly allocated data buffers (wavpack, prores, compressed buffers) are padded to meet the requirements of AVPacket. About 10x speed up in matroska_parse_frame(). Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: factor the prores packet parsing code outJames Almer2018-04-061-12/+38
| | | | | | | | Simplifies code in matroska_parse_frame(). This is in preparation for the following patch. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use refcounted buffers in EbmlBinJames Almer2018-04-061-13/+31
| | | | | | | | | Data in EbmlBin objects is never changed after being read from the input file (save for two specific cases with encoded CodePrivate), so using AVBufferRef we can prevent unnecessary copy of data by instead creating new references to said constant data. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: address some more missing AVPacket freesJames Almer2018-04-041-13/+4
| | | | | | Fixes memleaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: address a missing AVPacket freeJames Almer2018-04-041-11/+2
| | | | | | Fixes memleaks. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: use AVPacketList to queue packetsJames Almer2018-04-041-39/+23
| | | | | | It's more robust and efficient. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: fix return valueJames Almer2018-02-201-1/+1
| | | | | | err is already an AVERROR. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: free the packet on webvtt side data allocation failureJames Almer2018-02-201-0/+2
| | | | | | Fixes potential memory leaks Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: ignore CodecPrivate if the stream is VP9James Almer2018-02-191-0/+4
| | | | | | | | | | | Defined in a recent revision of https://www.webmproject.org/docs/container/ This prevents storing the contents of CodecPrivate into extradata for a codec that doesn't need nor expect any. It will among other things prevent matroska specific binary data from being dumped onto other formats during remuxing. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskadec: force full frame parsing of MLP/TrueHD streamsJames Almer2018-01-291-1/+3
| | | | | | | There's at least one known file with a TrueHD stream that hasn't been correctly muxed, and requires full frame parsing and repack. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-281-2/+2
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/matroskadec: Fix float-cast-overflow undefined behavior in ↵Nikolas Bowe2018-01-191-2/+10
| | | | | | matroska_parse_tracks() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '55fe72a841ba306370e68e86c88f34b4456aa4dd'James Almer2017-11-121-0/+6
|\ | | | | | | | | | | | | * commit '55fe72a841ba306370e68e86c88f34b4456aa4dd': matroskadec: don't warn about unknown spherical medata when none is present Merged-by: James Almer <jamrial@gmail.com>
| * matroskadec: don't warn about unknown spherical medata when none is presentJames Almer2017-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | track->video.projection.type is set to 0 (a Matroska specific "No spherical metadata present" value, with no related AVSphericalMapping) by default on files without the element. This removes bogus warnings on every single matroska file without Spherical metadata. Signed-off-by: James Almer <jamrial@gmail.com>
| * spherical: Change types of bounding and pad to uint32_tVittorio Giovara2017-03-231-3/+3
| | | | | | | | | | | | | | | | | | These values are defined to be 32bit in the specification, so it makes more sense to store them as fixed width. Based on a patch by Micahel Niedermayer <michael@niedermayer.cc>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * mkv: Export bounds and padding from spherical metadataVittorio Giovara2017-03-071-2/+53
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '251849f06ce36ce8dc076e0fca2922119fa7e39e'James Almer2017-10-171-3/+4
|\ \ | |/ | | | | | | | | | | | | | | * commit '251849f06ce36ce8dc076e0fca2922119fa7e39e': mkv: Add support for Spherical Video elements See 445204cd5777e029a6674ed0739777817eda5646 Merged-by: James Almer <jamrial@gmail.com>
| * mkv: Add support for Spherical Video elementsJames Almer2017-03-071-0/+69
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * matroskadec: make sure not to leave EbmlBin in an inconsistent stateAnton Khirnov2017-01-041-1/+4
| | | | | | | | | | | | | | | | | | | | If a read fails, the current code will free the data but leave the size non-zero. Make sure the size is zeroed in such a case. CC: libav-stable@libav.org Bug-Id: 1001 Found-By: Kamil Frankowicz Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
| * matroskadec: fix SRT subtitle durationJohn Stebbins2016-12-241-2/+2
| | | | | | | | The codec id for SRT was changed and conditionals were not updated.
* | avformat/matroskadec: fix resource leakSteven Liu2017-05-071-0/+1
| | | | | | | | | | | | | | | | Fixes Coverity CID: 1405453 Reviewed-by: wm4 <nfxjfg@googlemail.com> Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* | avformat/matroskadec: export Content Light Level metadataJames Almer2017-04-301-0/+15
| | | | | | | | | | | | Based on a patch by Hendrik Leppkes Signed-off-by: James Almer <jamrial@gmail.com>
* | webm_dash_manifest_demuxer: Fix initialization range for files with cues at ↵Derek Buitenhuis2017-04-231-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | the front The WebM DASH spec states: The Initialization Segment shall not contain Clusters or Cues. The Segment Index corresponds to the Cues. Previously, it included the cues if they were at the front. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | webm_dash_manifest_demuxer: Fix UB in cue timestamp string code and make it ↵Derek Buitenhuis2017-04-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | actually work Output was apparently not tested for correctness. Passing overlapping memory to snprintf causes undefined behavior, and usually resulted in only the very last timestamp being written to metadata, and not a list at all. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | matroskadec,cosmetics: fix a couple typosJames Zern2017-04-171-2/+2
| | | | | | | | Signed-off-by: James Zern <jzern@google.com>
* | webm_dash_manifest: Add option to specify bandwidthVignesh Venkatasubramanian2017-04-171-1/+18
| | | | | | | | | | | | | | | | | | Add an option to webm_dash_manifest demuxer to specify a value for "bandwidth" field in the DASH manifest. The value is then used by the muxer. Fixes an existing FIXME in the code. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: James Zern <jzern@google.com>
* | Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-311-4/+3
|\ \ | |/ | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-081-4/+3
| |
* | lavf: fix usages of av_get_codec_tag_string()Clément Bœsch2017-03-291-5/+2
| |
* | Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-1/+1
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
| * matroskadec: export CodecDelayAnton Khirnov2016-07-031-0/+7
| |
| * Mark read-only tables as staticDiego Biurrun2016-05-051-1/+1
| |
* | spherical: Change types of bounding and pad to uint32_tVittorio Giovara2017-03-171-4/+3
| | | | | | | | | | | | | | | | | | These values are defined to be 32bit in the specification, so it makes more sense to store them as fixed width. Based on a patch by Micahel Niedermayer <michael@niedermayer.cc>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | matroskadec: cosmetics: Rearrange checks for projection-depedendent propertiesVittorio Giovara2017-03-071-12/+9
| |
* | mkv: Export bounds and padding from spherical metadataVittorio Giovara2017-03-071-3/+61
| | | | | | | | Update the fate test as needed.
* | lavf/matroskadec: Fix demuxing sipr.Carl Eugen Hoyos2017-02-281-1/+1
| | | | | | | | Regression since 2c8d876d
* | lavf/matroskadec: fix is_keyframe for early BlocksChris Cunningham2017-02-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/matroskadec: ProjectionPrivate is optional on Equirectangular ↵James Almer2017-01-261-2/+0
| | | | | | | | | | | | | | | | projections This reflects a recent change to the spec draft. Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: Fix OOM on long streamsMichael Niedermayer2016-12-271-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/matroskadec: remove the strict unofficial check for Colour elementsJames Almer2016-12-101-6/+3
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: allocate Colour related fields only if the file ↵James Almer2016-12-101-24/+30
| | | | | | | | | | | | | | | | | | | | contains the relevant master The demuxer doesn't fill the defaults if the master isn't present. This results in codecpar->color_space being set with a value of zero (RGB) on such files. Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: remove unused variableJames Almer2016-12-081-1/+1
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: fix memleak on stream side data failureJames Almer2016-12-081-1/+3
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: add support for Spherical Video elementsJames Almer2016-12-071-0/+62
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | matroskadec: partly revert "demux relevant subtitle packets after a seek"Rainer Hochecker2016-12-021-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts parts of c16582579b1c6f66a86615c5808cd5b2bf17be73. The hard coded 30 seconds are a lot, and finishing the seek can takes several seconds when the source is on a network share. Remove this code entirely, because it does more bad than good. (Commit message provided by committer, based on the original messages by the patch author.) Signed-off-by: Rainer Hochecker <fernetmenta@online.de> Signed-off-by: wm4 <nfxjfg@googlemail.com>
* | matroskadec: prevent access of elements after freeingMichael Schenk2016-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | Using the decode interrupt feature of ffmpeg may cause crashes by accessing previously freed pointers in matroska_read_close. To prevent this reset nb_elem to zero after freeing the elements, because ffmpeg normally tests for nb_elem. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_headerAndreas Cadhalpun2016-11-081-0/+5
| | | | | | | | | | | | | | The code assumes that s->streams[0] is valid. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/matroskadec: fix DiscardPadding element parsingJames Almer2016-11-081-3/+7
| | | | | | | | | | | | | | | | | | | | If the value is negative then it means padding at the start of the packet instead of at the end. Based on a patch by Hendrik Leppkes. Reviewed-by: James Zern <jzern-at-google.com@ffmpeg.org> Signed-off-by: James Almer <jamrial@gmail.com>
* | avformat/matroskadec: fix BitsPerChannel element's default valueJames Almer2016-10-181-1/+1
| | | | | | | | | | | | | | The element is currently ignored, so there's no effective functionality change with this. Signed-off-by: James Almer <jamrial@gmail.com>
OpenPOWER on IntegriCloud