Mark Reid
4f69477870
libavformat/mxfdec.c refactor resolving MultiDescriptor and remove essence group hack
...
I think this is a better way to deal with single frame essence data then my
previous way.
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04 23:31:37 +01:00
Michael Niedermayer
8653419e9d
avformat/mxfdec: Reset structural_components_count when allocation fails
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 23:25:19 +01:00
Mark Reid
e5d217f048
libavformat/mxfdec.c: initial support for EssenceGroups
...
Previous version reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 23:14:06 +01:00
Michael Niedermayer
2ad38c6e02
avformat/mxfdec: dont ask for samples with field dominance 0 anymore
...
Based on discussion and patch from
"[FFmpeg-devel] [PATCH]Do not ask for mxf samples with unknown field dominance"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-26 02:07:57 +01:00
Reimar Döffinger
79be253635
mxfdec: minor simplification.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-11-22 14:06:48 +01:00
Mark Reid
08d81d0a01
libavformat/mxfdec.c: export source package uids and names as metadata
...
Changes since v1:
* renamed mxf_read_source_package -> mxf_read_package
v1 reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-22 03:35:02 +01:00
Carl Eugen Hoyos
92c07acce7
Read (display) aspect ratio from mxf files.
...
Fixes ticket #4107 .
2014-11-17 17:54:32 +01:00
Mark Reid
933eca91e6
libavformat/mxfdec.c: refactored resolving timecode component
...
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-15 02:45:53 +01:00
Michael Niedermayer
c1e035ea89
avformat/mxfdec: fix null pointer dereference
...
Fixes: signal_sigsegv_b5b3d4_2_001.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 03:54:49 +01:00
Tomas Härdin
1a25c336aa
mxfdec: Tighten RIP length bounds in mxf_read_random_index_pack()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:48 +01:00
Tomas Härdin
b83affdc94
mxfdec: Merge last_partition and footer_partition
...
FooterPartition offset specified in RIP takes precedence over any value written
in PartitionPacks. This fixes the same issue f06f6da
tries to fix without
introducing an extra variable.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:31 +01:00
Tomas Härdin
1b17b64ee4
Revert "avformat/mxfdec: detect loops during header parsing"
...
This reverts commit 1c010fd035
.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:59:16 +01:00
Tomas Härdin
37c3686155
mxfdec: Parse PreviousPartition in mxf_seek_to_previous_partition()
...
Without this patch the demuxer can get stuck in a loop if PreviousPartition
points somewhere where there's no PartitionPack, or if klv_read_packet() syncs
back up to the current partition.
This should fix Ticket3278 properly and unbreak Ticket4040.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:58:59 +01:00
Tomas Härdin
fc1b89d887
mxfdec: Break out parts of mxf_read_header() into separate functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-28 18:58:34 +01:00
Michael Niedermayer
3b709fd912
Merge commit '9dcf2397219ca796f0fafce2a703770d6fd09920'
...
* commit '9dcf2397219ca796f0fafce2a703770d6fd09920':
lavf: Check the return value of strftime
Conflicts:
libavformat/wtvdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-26 02:06:40 +01:00
Mark Reid
90bf1e3046
libavformat/mxfdec: read source timecode from pulldown component
...
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-25 23:15:04 +02:00
Martin Storsjö
9dcf239721
lavf: Check the return value of strftime
...
If the buffer provided to strftime is too small, the buffer contents
are indeterminate - it does not guarantee actually null terminating
the buffer.
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-26 00:14:54 +03:00
Vittorio Giovara
ad6b00d85f
mxfdec: add missing break
...
CC: libav-stable@libav.org
Bug-Id: CID 732232
2014-10-24 23:48:57 +01:00
Michael Niedermayer
676110e6d4
avformat/mxfdec: cleanup if parsing the header metadata fails
...
Fixes memleaks
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:34 +02:00
Michael Niedermayer
0834f2056c
avformat/mxfdec: Fix memleak of packages_refs
...
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:34 +02:00
Michael Niedermayer
aae4f5108d
avformat/mxfdec: Fix memleak of primer_packs
...
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 06:08:28 +02:00
Michael Niedermayer
e3b28f10bb
avformat/mxfdec: Fix termination of mxf_data_essence_container_uls
...
Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 02:09:17 +02:00
Mark Reid
5c50214eed
avformat/mxfdec: read reel_name and source timecode from physical source package
...
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-07 03:13:06 +02:00
Michael Niedermayer
00aa2ebb1c
Merge commit '369380e1c4c6fc9b0d9ff04ec23d46b252ba7110'
...
* commit '369380e1c4c6fc9b0d9ff04ec23d46b252ba7110':
mxf: Support AAC
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 23:06:38 +02:00
Michael Niedermayer
887d85fdcc
Merge commit '747cd9560c2248ff2834f29cd2190646330e4676'
...
* commit '747cd9560c2248ff2834f29cd2190646330e4676':
mxf: Add the UL for the MPEG2VideoDescriptor
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 22:00:50 +02:00
Michael Niedermayer
ecb7f1dd52
Merge commit '304089aca7d238ae184e09993b5c737aa22e2c2c'
...
* commit '304089aca7d238ae184e09993b5c737aa22e2c2c':
mxf: Add UID print helpers
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-17 21:50:06 +02:00
Luca Barbato
369380e1c4
mxf: Support AAC
...
Update mxf_set_audio_pts to use the container-provided information.
The UL is marked as "to be changed in the future", but the current
samples in the wild do use it.
2014-08-17 16:11:16 +02:00
Luca Barbato
747cd9560c
mxf: Add the UL for the MPEG2VideoDescriptor
2014-08-17 16:11:02 +02:00
Luca Barbato
304089aca7
mxf: Add UID print helpers
...
And use it to print non-parsed ULs.
2014-08-17 16:11:02 +02:00
Reimar Döffinger
a0941c8a2b
Use new av_dict_set_int helper function.
...
Get rid of the many, slightly differing, implementations
of basically the same thing.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-16 14:31:41 +02:00
James Almer
d34ec64a22
replace calls to url_feof() with avio_feof()
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-08 00:48:38 +02:00
Reimar Döffinger
04aec74f45
mxfdec: add missing "const" to array declaration.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-07-30 20:25:29 +02:00
Michael Niedermayer
8b1e920676
Merge commit '259fe7280d0b63dc7a8ff017d44f26d3a84cfde8'
...
* commit '259fe7280d0b63dc7a8ff017d44f26d3a84cfde8':
mxf: Extract origin information from material and source track
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-29 00:18:03 +02:00
Michael Niedermayer
4a4d0258ee
Merge commit 'c9d982aa11a6267611c3770792f0e04b48438348'
...
* commit 'c9d982aa11a6267611c3770792f0e04b48438348':
mxf: Detect Vanc/Vbi SMPTE-436M mxf track
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-29 00:12:03 +02:00
Marc-Antoine Arnaud
259fe7280d
mxf: Extract origin information from material and source track
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-07-28 22:17:42 +02:00
Marc-Antoine Arnaud
c9d982aa11
mxf: Detect Vanc/Vbi SMPTE-436M mxf track
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-07-28 22:17:42 +02:00
Michael Niedermayer
069e462beb
Merge commit 'ad8f736b7404503d8f5164f4879175a2258dd64b'
...
* commit 'ad8f736b7404503d8f5164f4879175a2258dd64b':
mxf: Remove typo
also See: [FFmpeg-devel] [PATCH 3/3] lavf/mxfdec: delete trailing semi-colon
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-04 02:18:32 +02:00
Luca Barbato
ad8f736b74
mxf: Remove typo
...
Reported-By: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-04-03 23:45:05 +02:00
Michael Niedermayer
2ef6c0fdf5
Merge commit 'af9481d7019d46c9f18c4ccac77a5d0c54cf6004'
...
* commit 'af9481d7019d46c9f18c4ccac77a5d0c54cf6004':
mxf: Lowercase UL strings
Conflicts:
libavformat/mxfdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-19 21:09:16 +01:00
Michael Niedermayer
8263c14691
Merge commit '842ea36c747eb6537c4236114346cb7a3e9a8df1'
...
* commit '842ea36c747eb6537c4236114346cb7a3e9a8df1':
mxf: Override faulty PreviousPartition entries
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-19 20:46:52 +01:00
Luca Barbato
af9481d701
mxf: Lowercase UL strings
...
The specification uses lower case most of the time.
2014-03-19 12:04:15 +01:00
Luca Barbato
842ea36c74
mxf: Override faulty PreviousPartition entries
...
Some files set the PreviousPartition field to point to its own offset.
If we are parsing forward the Previous partition is immediately known
and its value could be used, otherwise we can safely point to the
header.
Reported-By: Jean Baptiste Kempf <jb@videolan.org>
2014-03-19 11:56:33 +01:00
Michael Niedermayer
28ee7757f5
Merge commit 'd92024f18fa3d69937cb2575f3a8bf973df02430'
...
* commit 'd92024f18fa3d69937cb2575f3a8bf973df02430':
lavf: more correct printf format specifiers
Conflicts:
libavformat/asfdec.c
libavformat/cafdec.c
libavformat/dxa.c
libavformat/framecrcenc.c
libavformat/hnm.c
libavformat/iff.c
libavformat/mov.c
libavformat/mxfdec.c
libavformat/rmdec.c
libavformat/rpl.c
libavformat/smacker.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 21:05:34 +01:00
Diego Biurrun
d92024f18f
lavf: more correct printf format specifiers
2014-03-11 13:13:41 +01:00
Michael Niedermayer
4c63beeefe
Merge commit '8cafeb8bca5d079041739dbd72ccec0ead138eaf'
...
* commit '8cafeb8bca5d079041739dbd72ccec0ead138eaf':
mxfdec: Validate parameters to strftime
Conflicts:
libavformat/mxfdec.c
See: 423089e964
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 11:51:40 +01:00
Martin Storsjö
8cafeb8bca
mxfdec: Validate parameters to strftime
...
The MSVCRT version of strftime calls the invalid parameter handler
if the struct values in struct tm are invalid. In case no invalid
parameter handler is set for the process, the process is aborted.
This fixes fate failures on MSVC builds since 570af382
.
Based on a patch by Hendrik Leppkes.
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-10 11:11:08 +02:00
Michael Niedermayer
39f5003a07
Merge commit '5b977c1d4fd99f325049d48fb8f0a3240d50eef8'
...
* commit '5b977c1d4fd99f325049d48fb8f0a3240d50eef8':
mxf: Return meaningful errors
Conflicts:
libavformat/mxfdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 23:53:36 +01:00
Michael Niedermayer
618d2262d7
Merge commit 'f06f6daaf8538eb8ceeb690b761f1256771b6ba6'
...
* commit 'f06f6daaf8538eb8ceeb690b761f1256771b6ba6':
mxf: Parse random index pack
Conflicts:
libavformat/mxfdec.c
See: f5ed83c383
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 23:45:05 +01:00
Michael Niedermayer
5a4852bc4d
Merge commit '570af382eea902afe09f3562e5e1b483981cca7e'
...
* commit '570af382eea902afe09f3562e5e1b483981cca7e':
mxf: Handle identification metadata
Conflicts:
libavformat/mxfdec.c
See: 25b143aa7b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 22:59:35 +01:00
Michael Niedermayer
3ce8581413
Merge commit '5b930092c3afd2ae01f1c8aa7fb405911d6ad416'
...
* commit '5b930092c3afd2ae01f1c8aa7fb405911d6ad416':
mxf: Set audio packets pts
Conflicts:
libavformat/mxfdec.c
See: 83cab07a4c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-06 22:50:06 +01:00