mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-25 10:28:09 +00:00
mp4mux: Skip gap buffers instead of writing empty samples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987>
This commit is contained in:
parent
516b561191
commit
c771c86631
1 changed files with 8 additions and 0 deletions
|
@ -783,6 +783,14 @@ impl MP4Mux {
|
||||||
let stream = &mut state.streams[idx];
|
let stream = &mut state.streams[idx];
|
||||||
let buffer = stream.pending_buffer.take().unwrap();
|
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);
|
gst::trace!(CAT, obj: stream.sinkpad, "Handling buffer {buffer:?} at offset {}", state.current_offset);
|
||||||
|
|
||||||
let duration = buffer.duration.unwrap();
|
let duration = buffer.duration.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue