summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
Commit message (Collapse)AuthorAge
* avformat/mxfdec: reindent codeLimin Wang2020-05-05
| | | | | Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mxfdec: Correct confusing struct tagAndreas Rheinhardt2020-03-30
| | | | | | | | Don't use typedef struct MXFTrack {...} MXFTimecodeComponent, in particular given the fact that MXFTrack is a type of its own. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mxfdec: use av_asprintf()Limin Wang2020-03-23
| | | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxf: get rid of samples per frame array usageMarton Balint2020-03-14
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: Clear metadata_sets_count in mxf_read_close()Michael Niedermayer2019-12-01
| | | | | | This avoids problems if the function is called twice Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: cleanup on "essence prior to first PartitionPack"Michael Niedermayer2019-11-08
| | | | | | | | Fixes: memleak Fixes: 18473/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5738557074833408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: do not ignore bad size errorsMarton Balint2019-08-22
| | | | | | | The return value was unintentionally lost after 00a2652df3bf25a27d174cc67ed508b5317cb115. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: fix and enhance RIP KLV length checksMarton Balint2019-04-28
| | | | | | | | | KLV length is BER encoded (variable size), but the code assumed the encoding to always use 4 bytes. Fixes parsing Random Index Pack in samples/MXF/issue2160/PW0805A0V01.4C5B5636.EFA330.mxf. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: take into account run-in in find_partition_by_offsetMarton Balint2019-04-28
| | | | | | | Also rename the function to find_partition_by_absolute_offset to make it clear offset is absolute. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: guess wrapping of tracks by other tracks with the same body sidMarton Balint2019-04-28
| | | | | | | | | | | | | | | | This affects the following samples: samples/ffmpeg-bugs/roundup/issue1775/av_seek_frame_failure.mxf samples/ffmpeg-bugs/trac/ticket1957/16ch.mxf samples/ffmpeg-bugs/trac/ticket5016/r0.mxf samples/ffmpeg-bugs/trac/ticket5016/r1.mxf samples/ffmpeg-bugs/trac/ticket5316/hq.MXF samples/ffmpeg-bugs/trac/ticket5316/hqx.MXF Some AVPacket->pos values are changed because for frame wrapped tracks we point to the KLV offset and not the data. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: rework mxf_essence_container_endMarton Balint2019-04-28
| | | | | | | We find the last essence container much faster if we go through the partitions backwards... Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: use operational_pattern_ul instead of operational_pattern ↵Marton Balint2019-04-14
| | | | | | | | for metadata This makes it more consistent with other metadata keys. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: export operational pattern UL as file metadataMarton Balint2019-04-11
| | | | | | | Can be useful for API users as ffmpeg/libavformat can't properly support some operational patterns. Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-21
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* Add the Canon XF-HEVC UL to the picture essence container UL listMatthew McKenna2019-03-08
|
* avformat/mxfdec: support subsecond precision of decoded timestampsMarton Balint2018-12-25
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: replace obsolete commentMarton Balint2018-12-25
| | | | | | We no longer use strftime directly but use av_timegm to get an int64_t timestamp. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: Do not process zero modified_date timestamp.Michael Niedermayer2018-12-22
| | | | | | | | | This causes windows to fail as the timestamp is outside its supported range Fixes regression & fate Reviewed-by: Marton Balint <cus@passwd.hu> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: fix error check in macroPaul B Mahol2018-12-13
| | | | Fixes #6750.
* avformat/mxfdec: fix indentationPaul B Mahol2018-12-09
|
* avformat/mxfdec: set codec_tag for prores codecPaul B Mahol2018-12-07
|
* lavf/mxfdec: demux s436m as eia608 subtitle trackBaptiste Coudurier2018-10-12
|
* lavf/mxfenc: support creating s436m data tracksBaptiste Coudurier2018-10-12
|
* avformat/mxfdec: do not use sound essence descriptor quantization bits for ↵Marton Balint2018-09-05
| | | | | | | | | | | | | bits_per_coded_sample It refers to the uncompressed quantization, therefore is not correct for AAC. Also change mxf_set_pts to work based on current edit unit if bits_per_coded_sample is not available. Fixes error messages in the sample of ticket #7366. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: drop invalid index table segments when sorting themMarton Balint2018-07-24
| | | | | | | | | This way if an index table segment is present multiple times, we can always use the proper one instead of the invalid one. Fixes seeking in the sample of ticket #5671. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: only call mxf_free_metadataset when ctx_size is != 0, ↵Baptiste Coudurier2018-07-19
| | | | otherwise ctx == mxf
* avformat/mxfdec: only return stream indexes which have a corresponding trackMarton Balint2018-07-13
| | | | | | | Without this check some crafted files might crash because a packet might be demuxed which have no corresponding mxf track. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: Fix av_log contextMichael Niedermayer2018-07-05
| | | | | | | | Fixes: out of array access Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mxfdec: add support for opAtom without indexMarton Balint2018-07-04
| | | | | | Clip wrapped code is capable of doing some magic for such files. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: guess constant byte count indexes based on track durationMarton Balint2018-07-04
| | | | | | | For clip wrapped essences this should work. Also, since index_edit_rate can now be different from track edit rate, remove overriding track edit rate. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: take into account index_edit_rateMarton Balint2018-07-04
| | | | | | | Fixes samples/ffmpeg-bugs/roundup/issue591/02785736.mxf Fixes samples/ffmpeg-bugs/trac/ticket1916/pcm_s24le_to_pcm_s16le.mxf Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: fix indentation and rename mxf_read_packet_oldMarton Balint2018-07-04
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for clip wrapped essencesMarton Balint2018-07-04
| | | | | | | | | | Also use common code with opAtom. Fixes ticket #2776. Partially fixes ticket #5671. Fixes ticket #5866. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: avoid index_table->nb_ptses overflow in ↵Marton Balint2018-06-24
| | | | | | mxf_compute_ptses_fake_index Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: compute sample_count for all streams on seekMarton Balint2018-06-24
| | | | | | sample_count will be used for per-stream current_edit_unit. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for returning the partition for ↵Marton Balint2018-06-24
| | | | | | mxf_edit_unit_absolute_offset and mxf_absolute_bodysid_offset Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: make current_edit_unit a parameter of mxf_compute_samplesMarton Balint2018-06-24
| | | | | | No change in functionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: make edit_units_per_packet a track propertyMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: simply use the first essence element for non frame-wrapped ↵Marton Balint2018-06-24
| | | | | | | | | partition essence offset Also add the canopus essence element to the list of the recognized essence element keys. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: compute both essence_offset and essence_length in ↵Marton Balint2018-06-24
| | | | | | | | | mxf_compute_essence_containers Also compute the correct essence_offset and essence_length for all clip wrapped essences. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: extend mxf_handle_missing_index_segment for all clip ↵Marton Balint2018-06-24
| | | | | | | | | wrapped essences Also make sure we set a valid track index sid and a valid track edit rate in order for the index to be useful. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add some essence container uls from SMPTE draftMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for determining essence wrapping schemeMarton Balint2018-06-24
| | | | | | Some code is based on bmxlib-libmxf/mxf/mxf_utils.c. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: store next_klv in KLVPacketMarton Balint2018-06-24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add support for recognizing timed text streamsMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: remove check for NULL MXFTrack in mxf_set_ptsMarton Balint2018-06-08
| | | | | | It cannot happen for video streams. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: only disallow seek on metadata streamsMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: recognize SMPTE 436 VBI dataMarton Balint2018-06-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: use MXFCodecUL struct to store essence description for ↵Marton Balint2018-06-08
| | | | | | data_essence_container_uls Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: add some missing picture_essence_container_ulsMarton Balint2018-05-30
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>