Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Carl Eugen Hoyos
6b2bb3d231
Cosmetics: Reindent after last commit.
9 years ago
Carl Eugen Hoyos
35b33f1a19
lavf/mxfdec: Set codec_tag AVup for Avid 1:1 input.
9 years ago
Marton Balint
53f2ef2c4a
mxfdec: calculate the index in display order
...
This should fix seeking for open GOP files as well.
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Marton Balint <cus@passwd.hu>
9 years ago
Michael Niedermayer
cf11fd632e
avformat/mxfdec: Change version byte for JPEG2000 to match mxf.c and RP224v12
...
This should make no difference as the byte is ignored
Found-by: tim nicholson <nichot20@yahoo.com>
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d0061e77cd
avformat/mxfdec: Detect jpeg2000 through codec_ul too
...
Fixes Ticket2345
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e43f3c8858
avformat/mxfdec: return error instead of segfaulting if there are no streams
...
Fixes segfault from ticket 4350
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
10 years ago
Mark Reid
e575589378
libavformat/mxfdec: fix MXFPackage->comment_refs memory leak
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mark Reid
43cafb956e
libavformat/mxfdec: export user comments metadata
...
Previous-revision-reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Martin Storsjö
6448f15af0
mxfdec: Fix the error handling for when strftime fails
...
The str variable is a char ** here.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Vilius Grigaliūnas
2af260e3a8
avformat/mxfdec: Detect XYZ pixel format for digital cinema files
...
While the native jpeg2000 decoder can determine pixel format correctly
from the codestream, libopenjpeg wrapper cannot. To make sure that
the output is correct when using libopenjpeg to decode digital
cinema files, we do detection from the metadata included in the MXF
wrapper.
If the container has "JPEG 2000 Coding Parameters" metadata element
with Rsiz value set to one of digital cinema profiles, we can safely
assume that the given input file is DCI compliant, therefore the
pixel format should be XYZ.
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mark Reid
ec5a4af560
libavformat/mxfdec: refactor reading strong ref array
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
daf8cf358a
avformat: Don't anonymously typedef structs
10 years ago
Carl Eugen Hoyos
449b8cf04b
avformat/mxfdec: Fix cleanup in mxf_free_metadataset()
...
Fixes Ticket4256
Found-by: tholin
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mark Reid
b396914c68
libavformat/mxfdec.c: support demuxing opatom audio without index
...
Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mark Reid
b23a866844
libavformat/mxfdec.c: export the full UMID as metadata
...
Previous version reviewed-by: tim nicholson
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Mark Reid
b08b5f4be2
libavformat/mxfdec.c: read project_name metadata
...
MXF files generated by Media Composer or LibMXF can contain a
project name property in the Preface. Lots of existing samples have them.
http://samples.ffmpeg.org/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf
project_name : DNX145 PW Test
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket3450/WriteAvidMXFgenerated/5502_0010_v1.mxf
project_name : Rombus
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket3100/1sec_mxf_test_Video5270C795.mxf
project_name : NVB_DOOD
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Carl Eugen Hoyos
4373a25d94
lavf/mxfdec: Fix memleaks reading corrupt files.
...
Fixes ticket #4173 .
Reviewed-by: Tomas Härdin
10 years ago
Carl Eugen Hoyos
27bdfd29f1
lavf/mxfdec: Factorize mxf_read_close().
...
This will allow to fix leaks in a subsequent commit.
10 years ago
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>
10 years ago
Michael Niedermayer
8653419e9d
avformat/mxfdec: Reset structural_components_count when allocation fails
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
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>
10 years ago
Reimar Döffinger
79be253635
mxfdec: minor simplification.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
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>
10 years ago
Carl Eugen Hoyos
92c07acce7
Read (display) aspect ratio from mxf files.
...
Fixes ticket #4107 .
10 years ago
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>
10 years ago
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>
10 years ago
Tomas Härdin
1a25c336aa
mxfdec: Tighten RIP length bounds in mxf_read_random_index_pack()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Tomas Härdin
1b17b64ee4
Revert "avformat/mxfdec: detect loops during header parsing"
...
This reverts commit 1c010fd035
.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
Tomas Härdin
fc1b89d887
mxfdec: Break out parts of mxf_read_header() into separate functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Tomas Härdin
11467ecf51
mxfdec: reduce loop bound in mxf_read_pixel_layout()
...
Makes coverity less confused and code more readable.
Bug-Id: CID 732262
10 years ago
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>
10 years ago
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>
10 years ago
Vittorio Giovara
ad6b00d85f
mxfdec: add missing break
...
CC: libav-stable@libav.org
Bug-Id: CID 732232
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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.
10 years ago
Luca Barbato
747cd9560c
mxf: Add the UL for the MPEG2VideoDescriptor
10 years ago
Luca Barbato
304089aca7
mxf: Add UID print helpers
...
And use it to print non-parsed ULs.
10 years ago
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>
10 years ago
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>
10 years ago
Reimar Döffinger
04aec74f45
mxfdec: add missing "const" to array declaration.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Marc-Antoine Arnaud
259fe7280d
mxf: Extract origin information from material and source track
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago