Media file processing method, and device therefor
According to one embodiment of the present document, a method by which a media file processing device processes a media file is provided. The method comprises the steps of: restoring a sequence of access units for a first OLS; determining whether a first condition and a second condition are true; and inserting, on the basis that the first condition and the second condition are true, as many EOS NAL units as the number of layers applied to the first OLS, wherein the first condition is about whether an OLS differing from the first OLS is selected after the sequence of the access units, and the second condition is about whether the sequence of the access units does not end with an EOS NAL unit or does not end with an EOB NAL unit in each layer of the first OLS.
1 . A method for processing a media file, the method comprising:
reconstructing a sequence of access units for a first Output Layer Set (OLS);
determining whether a first condition and a second condition are true; and
based on the first condition and the second condition being true, inserting End Of Sequence (EOS) Network Abstraction Layer (NAL) units as many as a number of layers applied to the first OLS,
wherein the first condition is whether an OLS different from the first OLS is selected following the sequence of the access units,
wherein the second condition is whether the sequence of the access units does not end with an EOS NAL unit or an End Of Bitstream (EOB) NAL unit in each layer of the first OLS, and
wherein the inserted EOS NAL units are arranged at an end of an access unit of the sequence in ascending order of layer IDs of the EOS NAL units.
2 . A media file processing apparatus for performing a media file processing method, comprising:
a receiver which acquires a media file; and
a media file processor which reconstructs a sequence of access units for a first Output Layer Set (OLS) of the media file, determines whether a first condition and a second condition are true, and based on the first condition and the second condition being true, inserts End Of Sequence (EOS) Network Abstraction Layer (NAL) units as many as a number of layers applied to the first OLS,
wherein the first condition is whether an OLS different from the first OLS is selected following the sequence of the access units,
wherein the second condition is whether the sequence of the access units does not end with an EOS NAL unit or an End Of Bitstream (EOB) NAL unit in each layer of the first OLS, and
wherein the inserted EOS NAL units are arranged at an end of an access unit of the sequence in ascending order of layer IDs of the EOS NAL units.
3 . A method for generating a media file, the method comprising:
generating a sequence of access units for a first Output Layer Set (OLS);
determining whether a first condition and a second condition are true;
based on the first condition and the second condition being true, inserting End Of Sequence (EOS) Network Abstraction Layer (NAL) units as many as a number of layers applied to the first OLS; and
generating the media file including the first OLS,
wherein the first condition is whether an OLS different from the first OLS is selected following the sequence of the access units,
wherein the second condition is whether the sequence of the access units does not end with an EOS NAL unit or an End Of Bitstream (EOB) NAL unit in each layer of the first OLS, and
wherein the inserted EOS NAL units are arranged at an end of an access unit of the sequence in ascending order of layer IDs of the EOS NAL units.