1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

341 Commits

Author SHA1 Message Date
Michael Niedermayer
a0fe1a25fa Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'
* commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e':
  avformat: Don't anonymously typedef structs

Conflicts:
	libavformat/adtsenc.c
	libavformat/aiffenc.c
	libavformat/avidec.c
	libavformat/gif.c
	libavformat/iff.c
	libavformat/img2dec.c
	libavformat/jvdec.c
	libavformat/matroskadec.c
	libavformat/udp.c
	libavformat/wtvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14 21:07:40 +01:00
Diego Biurrun
daf8cf358a avformat: Don't anonymously typedef structs 2015-02-14 10:13:47 -08:00
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>
2015-01-28 05:26:01 +01:00
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>
2015-01-18 22:02:58 +01:00
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>
2015-01-13 01:16:39 +01:00
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>
2015-01-12 20:26:58 +01:00
Carl Eugen Hoyos
4373a25d94 lavf/mxfdec: Fix memleaks reading corrupt files.
Fixes ticket #4173.

Reviewed-by: Tomas Härdin
2014-12-15 01:37:12 +01:00
Carl Eugen Hoyos
27bdfd29f1 lavf/mxfdec: Factorize mxf_read_close().
This will allow to fix leaks in a subsequent commit.
2014-12-15 01:31:12 +01:00
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
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
2014-10-27 19:08:02 +00: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