You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we are releasing Single NAL Unit before releasing the accumulated FU Fragments. Lets consider following example:
Let us consider the following NAL fragments. A integer in the first box means a id and other other box contains the type of NAL Unit. -> refers to the next NALUnit that was received.
| 22 |FU Unit........ | -> | 23 |FU Unit .......... | -> | 24 |FU Unit .......... | -> | 25 | Single NAL Unit .......... | ->| 26 |FU Unit .......... | -> | 27 |FU Unit .......... | ......
In above NALUnit fragments from 22 to 24 will be in a buffer. Then fragment with id 25 arrives but it gets released before releasing the previous NALUnits. I guess this causes some more scratches in the decoded video.
Therefore, How about releasing the previous buffer before releasing the single unit to decoder ?
How about adding
if fragment.isEndUnit{
didAssembleFU(&fragmentedNALU!)//Send the portion of data that we have collected so far in the past.
fragmentedNALU = nil
}
At
RTPPlayer-iOS/RTPPlayer/Video/AVCDefragmenter.swift
Line 40 in 37d97d3
we are releasing Single NAL Unit before releasing the accumulated FU Fragments. Lets consider following example:
Let us consider the following NAL fragments. A integer in the first box means a id and other other box contains the type of NAL Unit. -> refers to the next NALUnit that was received.
| 22 |FU Unit........ | -> | 23 |FU Unit .......... | -> | 24 |FU Unit .......... | -> | 25 | Single NAL Unit .......... | ->| 26 |FU Unit .......... | -> | 27 |FU Unit .......... | ......
In above NALUnit fragments from 22 to 24 will be in a buffer. Then fragment with id 25 arrives but it gets released before releasing the previous NALUnits. I guess this causes some more scratches in the decoded video.
Therefore, How about releasing the previous buffer before releasing the single unit to decoder ?
How about adding
at
RTPPlayer-iOS/RTPPlayer/Video/VideoDefragmenter.swift
Line 49 in 37d97d3
Thanks
The text was updated successfully, but these errors were encountered: