Tomas Härdin and Luca Barbato
1fadf53e00
mxfdec: truncate packets that extend past the next edit unit
...
This fixes rare cases where OPAtom may be treated
as OP1a, causing all essence to be read into RAM.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Luca Barbato <lu_zero@gentoo.org >
2012-07-10 13:51:04 +02:00
Tomas Härdin and Diego Biurrun
e24167aae6
mxfdec: Ignore the last entry in Avid's index table segments
...
The last entry is the total size of the essence container.
Previously a TemporalOffset error would be logged, even though
segments like these are expected.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 13:26:02 +01:00
Tomas Härdin and Diego Biurrun
d6b81ff949
mxfdec: Sanity-check SampleRate
...
This avoids a SIGFPE if SampleRate is missing or set to naughty values.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 13:00:05 +01:00
Tomas Härdin and Diego Biurrun
c65642d351
mxfdec: Handle small EditUnitByteCount
...
These are common with audio atoms. Without this the demuxer would read two
bytes at a time for a mono 16-bit file.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:59:41 +01:00
Tomas Härdin and Diego Biurrun
240ddbce56
mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
...
This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:55:44 +01:00
Tomas Härdin and Diego Biurrun
9123950be0
mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:54:14 +01:00
Tomas Härdin and Diego Biurrun
d00257e96a
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
...
This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:54:13 +01:00
Tomas Härdin and Diego Biurrun
df2a85085e
mxfdec: Sanity check PreviousPartition
...
Without this certain files could get the demuxer stuck in a loop.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:54:05 +01:00
Tomas Härdin and Diego Biurrun
11800c8c89
mxfdec: Never seek back in local sets and KLVs
...
Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend
past the end of the set and not allowing other KLVs to be read past
the end of themselves.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:46:12 +01:00
Tomas Härdin and Diego Biurrun
687e2fdebd
mxfdec: Move the current_partition check inside mxf_read_header()
...
This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:43:47 +01:00
Tomas Härdin and Diego Biurrun
e352c96c17
mxfdec: Fix infinite loop in mxf_packet_timestamps()
...
This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:42:59 +01:00
Tomas Härdin and Diego Biurrun
0373ec635d
mxfdec: Check eof_reached in mxf_read_local_tags()
...
This fixes an infinite loop with zzuf2.mxf.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:41:50 +01:00
Tomas Härdin and Diego Biurrun
effe3b9575
mxfdec: Check for NULL component
...
This fixes a SIGSEGV with zzuf1.mxf.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:41:50 +01:00
Tomas Härdin and Diego Biurrun
29fc8f50cd
mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
...
Only the OPAtom demuxing logic is guaranteed to have index tables,
meaning OP1a files that lack an index would cause SIGSEGV.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:41:42 +01:00
Tomas Härdin and Diego Biurrun
a3923482f2
mxfdec: Make sure x < index_table->nb_ptses
...
Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-02-09 12:40:34 +01:00
Tomas Härdin and Diego Biurrun
62271c4c9a
mxfdec: Fix files with essence containers larger than 2 GiB.
...
For such files, accumulating into an int would cause an overflow.
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-01-26 15:47:50 +01:00
Tomas Härdin and Janne Grunau
fc85729458
mxfdec: Do not parse slices or DeltaEntryArrays.
...
The most recent demuxing/seeking code does not need them.
2012-01-22 14:40:54 +01:00
Tomas Härdin and Janne Grunau
1f5f8b2654
mxfdec: Add Avid's essence element key.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
3cb33fbe91
mxfdec: Compute packet offsets properly.
...
This replaces the old essence_offset code.
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
f4187945a0
mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
21cc4b3327
mxfdec: use av_dlog() for 'no corresponding source package found'
...
This is not an error and expected behavior for OPAtom files.
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
c77a5460b1
mxfdec: Make mxf->partitions sorted by offset.
...
This also zeroes new entries for good measure (used by future patches).
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
be78e3f6ec
mxfdec: parse ThisPartition
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:53 +01:00
Tomas Härdin and Janne Grunau
775d3b4ab1
mxfdec: Speed up metadata and index parsing.
...
Specifically, this means parsing as before until we run into essence.
At that point we seek to the footer and parse until EOF. After that we start
seeking backward to the previous partition and parse that until we run into
essence or the next partition. This procedure is repeated until we encounter
the last partition we parsed in the forward direction.
The end result of all this is that large essence containers are not needlessly
parsed. This speeds up parsing large files a lot.
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:52 +01:00
Tomas Härdin and Janne Grunau
0999151962
mxfdec: Make sure DataDefinition is consistent between material track and source track.
...
This fixes 0001GL.MXF.V1.mxf_opatom.mxf and 0001GL00.MXF.A1.mxf_opatom.mxf
getting two streams each due to both using the same SourcePackageID.
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:52 +01:00
Tomas Härdin and Janne Grunau
0ac5e6a8c4
mxfdec: add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:52 +01:00
Tomas Härdin and Janne Grunau
edb5085647
mxfdec: Add hack that adjusts the n_delta calculation when system items are present.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:52 +01:00
Tomas Härdin and Janne Grunau
83ab10f6e9
mxfdec: Move FooterPartition to MXFContext and make sure it is never zero.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2012-01-22 14:40:52 +01:00
Tomas Härdin and Janne Grunau
d32b3f40c7
mxfdec: parse MXF partitions
2012-01-22 14:40:51 +01:00
Tomas Härdin and Janne Grunau
c15da5941d
mxf: Add PictureEssenceCoding UL for V210.
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2011-12-21 16:28:45 +01:00
Tomas Härdin and Janne Grunau
6547fd9264
mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
...
This fixes playback of BRD38772509.mxf.
Signed-off-by: Janne Grunau <janne-libav@jannau.net >
2011-12-21 16:28:42 +01:00
Tomas Härdin and Diego Biurrun
8b7222979c
isom: add missing AVC-Intra tags, rearrange list and update comments
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2011-08-29 16:48:39 +02:00
Tomas Härdin and Anton Khirnov
b21e6b707f
wav: parse 'bext' metadata
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-13 11:57:51 +02:00
Tomas Härdin and Anton Khirnov
67b1761fcb
wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-13 11:57:51 +02:00
Tomas Härdin and Anton Khirnov
90f2ee8cb4
wav: Refactor the tag checking into a switch statement
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-13 11:57:51 +02:00
Tomas Härdin and Anton Khirnov
1cf18de982
wav: make sure neither data_size nor sample_count is negative.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-13 11:57:51 +02:00
Tomas Härdin and Anton Khirnov
7f84055e2d
wav: refactor the 'fmt ' tag search and parsing.
...
Moving the search and parsing of the 'fmt ' info the main loop of
wav_read_header() allows tags that precede it to be parsed. Creating
wav_parse_fmt_tag() makes wav_read_header() easier to read.
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-13 11:57:51 +02:00
Tomas Härdin and Anton Khirnov
99fecc64b0
gxf: Fix 25 fps DV material in GXF being misdetected as 50 fps
...
Set DV packet durations using fields_per_frame.
This requires turning gxf_stream_info into the demuxer's context for access to the value in gxf_packet().
Since MPEG-2 seems to work fine this done only for DV.
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-07-09 12:32:22 +02:00
Tomas Härdin and Anton Khirnov
ee81e76db1
wmaenc: improve channel count and bitrate error handling in encode_init()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2011-05-12 18:02:28 +02:00
Tomas Härdin and Ronald S. Bultje
1b7ecc1662
Add xd55 codec tag for XDCAM HD422 720p25 CBR files.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com >
2011-03-23 07:30:15 -04:00
Tomas Härdin and Mans Rullgard
e65b1934bf
Add ProRes FOURCCs to isom.c
...
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-02-03 11:40:56 +00:00
Tomas Härdin and Mans Rullgard
75fd0668df
Add APIchanges entry for lavc 52.109.0
...
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-02-03 11:40:32 +00:00
Tomas Härdin and Mans Rullgard
f5b82f45dc
Add CODEC_ID_PRORES and bump lavc minor version
...
Signed-off-by: Mans Rullgard <mans@mansr.com >
2011-02-03 11:38:09 +00:00
Tomas Härdin
66be80d610
mpegtsenc: Improve PCR generation and output
...
This fixes PCR drift due to accumulating TS_PACKET_SIZE*8*90000LL/ts->mux_rate each packet, due to rounding errors when mux_rate does not evenly divide 135360000.
This patch also increases the PCR precision to 27 MHz from 90 kHz and takes the location of the PCR data into account (+11 bytes according to the spec).
Originally committed as revision 25864 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-03 13:26:42 +00:00
Tomas Härdin
0f4cd732f1
Add myself as maintainer of lxfdec.c
...
Originally committed as revision 25282 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-01 11:08:28 +00:00
Tomas Härdin
8878e3b21b
Add demuxer for LXF (Leitch/Harris' VR native stream format)
...
Originally committed as revision 25281 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-01 11:08:24 +00:00
Tomas Härdin
fbeabfca2f
Add pcm_lxf, a decoder for the 20-bit planar PCM format used in LXF
...
Originally committed as revision 25280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-01 11:08:19 +00:00
Tomas Härdin
1620939022
mpegtsenc: Indent
...
Originally committed as revision 25222 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 12:27:26 +00:00
Tomas Härdin
d1ac03517e
mpegtsenc: Write subtitle extradata if set
...
Originally committed as revision 25221 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 12:27:23 +00:00
Tomas Härdin
bc6f0af289
Add av_popcount() to libavutil/common.h and bump minor version
...
Originally committed as revision 25120 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-14 14:45:43 +00:00
Tomas Härdin
11fdc4d4fc
mxfdec: Improve parsing of the PixelLayout item
...
Originally committed as revision 23898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 07:55:05 +00:00
Tomas Härdin
c1bdc9300b
avcodec.h: Clarify AVCodecContext::pix_fmt documentation since its value may be set by the demuxer
...
rawdec.c: Only perform bits_per_coded_sample -> pix_fmt guesswork if pix_fmt hasn't been set
Originally committed as revision 23561 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-10 08:39:05 +00:00
Tomas Härdin
77d3f1f792
Added M701 codec_tag for mpeg2video
...
Originally committed as revision 23513 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-07 11:27:26 +00:00
Tomas Härdin
951776c478
Made FLIC demuxer capable of handling the videos from "X-COM: Terror from the Deep".
...
Originally committed as revision 22942 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-22 09:04:33 +00:00
Tomas Härdin
6b174197b5
Predicting the size of the hdlr, string data and trkn tags in the MOV muxer
...
Originally committed as revision 22846 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-12 07:24:30 +00:00
Tomas Härdin
7a6fe01f99
Seeking forward in non-seekable media by discarding data, regardless of how far to seek. Won't SEEK_END unless forced though.
...
Originally committed as revision 22822 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-08 09:47:32 +00:00
Tomas Härdin
01d91b9be9
Reusing the probe buffer to rewind the ByteIOContext in ff_probe_input_buffer() instead of seeking back to the start of the file. Once exhausted, the size of the buffer is reduced.
...
Originally committed as revision 22821 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-08 09:02:27 +00:00
Tomas Härdin and Benoit Fouet
c6a5e087cf
Mask away AVSEEK_FORCE properly in some checks in url_fseek()
...
Patch by Tomas Härdin $(name).$(s/ä/a/ $(surname)) AT codemill DOT se
Originally committed as revision 22653 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-24 10:41:58 +00:00
Tomas Härdin and Carl Eugen Hoyos
d40a999a1c
Fix seeking in DV when filesize is unknown.
...
Patch by Tomas Härdin, tomas D hardin A codemill D se
Originally committed as revision 22645 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-23 17:22:25 +00:00
Tomas Härdin and Benoit Fouet
094a63f1f6
Check there is a stream before writing header.
...
Patch by Tomas Härdin: $(name) punto hardin chez codemill dot se
Originally committed as revision 21186 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 14:32:48 +00:00
Tomas Härdin and Ronald S. Bultje
08f7a8ac32
Use chunked encoding for HTTP uploads. Patch by Tomas Härdin
...
<$firstname.$lastname()codemill,se>.
Originally committed as revision 21166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 16:36:00 +00:00
Tomas Härdin and Carl Eugen Hoyos
6d01a97c86
Fail earlier for unsupported resolutions or pixel formats when encoding
...
dv.
Patch by Tomas Härdin, tomas D hardin A codemill D se
Originally committed as revision 20803 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-11 23:56:49 +00:00