As per Dolby whitebook, VUI parameters in the stream are compulsory for profiles 5, 8.1 and 8.4 but are optional for the other profiles.
Detection of profiles is re-written to account for the cases where there VUI parameters are unspecified.
In case coded field is detected (i.e. the picture is composed of a top field and a bottom field), the incrementation of the poc (coded picture order count) must be done every two frames.
However the detection of the coded filed in tsMuxer is wrong:
frame_mbs_only_flag = 1 means that the picture is coded frame.
frame_mbs_only_flag = 0 means that the picture can be either coded frame (m_field_pic_flag = 0) or coded field (m_field_pic_flag = 1).
This patch corrects the bug, and solves issue #306 .
updateTracksComboBox() was called after the indices are updated, but before the
row being removed is actually removed from the trackLV structure. This caused
the new generated track descriptions to refer to invalid tracks.
Indices in both combo boxes must be updated, since an audio track index might
have changed when a subtitle track is removed and vice versa : there is only one
array which holds information about tracks that these combo boxes reference via
the data contained in their items' UserRoles.
tsMuxer currently sets back the DTS (Decoding Time Stamp) during the muxing if the frame depth (i.e. difference between encoded picture number and decoded picture number) is found >1.
This is wrong: the frame depth should be checked -and the DTS set back- before the muxing commences.
This commits solves this.
tsMuxer currently detects the tracks from the first playlist (i.e. m2ts/clpi) of the mpls.
There can be cases where the subsequent playlists of the mpls contain additional audio/subtitle tracks.
This patch allows tsMuxer to detect the tracks from the playlist having the largest number of tracks.
Fixes#317.
See issue #329 : when a track starts after the first 16 MB in the m2ts, it is not detected.
It is therefore proposed to increase the detect buffer (i.e. size of scanned chunk) to 64 MB.
BluRay m2ts failure for linux 64-bit tsMuxeR
This bug was caused by using memcpy() in metaDemuxer.cpp with
overlapping buffers. Use memmove() instead. The other
changes were the result of a bench check of the sources.
This fixes (#316)
Co-authored-by: Craig Hadady <chadady@gmail.com>
The previous patch #251 solved one issue with double HEVC tracks, but created various issues with other tracks e.g. https://forum.doom9.org/showthread.php?p=1918290#post1918290
This patch puts back initialization of m_lastDTS to 0. I'll work out an alternative way to solve the double HEVC track DTS issue.
waveFormatPCMEx->nBlockAlign = m_channels * waveFormatPCMEx->wBitsPerSample / 8;
waveFormatPCMEx->wBitsPerSample = m_bitsPerSample == 20 ? 24 : m_bitsPerSample;
=> nBlockAlign is calculated with an incorrect wBitsPerSample value, as this wBitsPerSample value is defined on the next line only !