mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 03:21:00 +00:00
mp4mux: Skip gap buffers instead of writing empty samples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/974>
This commit is contained in:
parent
2b4fd40d62
commit
4d310434ab
1 changed files with 8 additions and 0 deletions
|
@ -783,6 +783,14 @@ impl MP4Mux {
|
|||
let stream = &mut state.streams[idx];
|
||||
let buffer = stream.pending_buffer.take().unwrap();
|
||||
|
||||
if buffer.buffer.flags().contains(gst::BufferFlags::GAP)
|
||||
&& buffer.buffer.flags().contains(gst::BufferFlags::DROPPABLE)
|
||||
&& buffer.buffer.size() == 0
|
||||
{
|
||||
gst::trace!(CAT, obj: stream.sinkpad, "Skipping gap buffer {buffer:?}");
|
||||
continue;
|
||||
}
|
||||
|
||||
gst::trace!(CAT, obj: stream.sinkpad, "Handling buffer {buffer:?} at offset {}", state.current_offset);
|
||||
|
||||
let duration = buffer.duration.unwrap();
|
||||
|
|
Loading…
Reference in a new issue