Age | Commit message (Collapse) | Author |
|
This avoids problems if the function is called twice
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 13816a1d085fdb6598ea6dc92ed3a1e6aff0cc1f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
The return value was unintentionally lost after
00a2652df3bf25a27d174cc67ed508b5317cb115.
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 6ee40dcb64c91cc9a4cb988408d8ed159dacdcfe)
|
|
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>
|
|
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>
|
|
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>
|
|
We find the last essence container much faster if we go through the partitions
backwards...
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
for metadata
This makes it more consistent with other metadata keys.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Can be useful for API users as ffmpeg/libavformat can't properly support some
operational patterns.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Reviewed-by: Lauri Kasanen
Reviewed-by: Tomas Härdin
|
|
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
We no longer use strftime directly but use av_timegm to get an int64_t timestamp.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
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>
|
|
Fixes #6750.
|
|
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
otherwise ctx == mxf
|
|
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>
|
|
Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
Clip wrapped code is capable of doing some magic for such files.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
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>
|
|
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>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Also use common code with opAtom.
Fixes ticket #2776.
Partially fixes ticket #5671.
Fixes ticket #5866.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
mxf_compute_ptses_fake_index
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
sample_count will be used for per-stream current_edit_unit.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
mxf_edit_unit_absolute_offset and mxf_absolute_bodysid_offset
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
No change in functionality.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Some code is based on bmxlib-libmxf/mxf/mxf_utils.c.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
It cannot happen for video streams.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
data_essence_container_uls
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
This also changes the rounding to nearest.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Some math (e.g: partition binary search) overflows if we have that many
parititions.
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Signed-off-by: Marton Balint <cus@passwd.hu>
|
|
Consider edit rate when determining edit_units_per_packet and also make sure
that checks are done in edit rate time base and not in stream time base.
Fixes some errors reported with the sample in ticket #5863.
Signed-off-by: Marton Balint <cus@passwd.hu>
|