mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
qtmux: handle 0 size packets without dividing by 0
Coverity 1139691
This commit is contained in:
parent
b692539b55
commit
1be86ebb2a
1 changed files with 4 additions and 1 deletions
|
@ -2387,7 +2387,10 @@ gst_qt_mux_add_buffer (GstQTMux * qtmux, GstQTPad * pad, GstBuffer * buf)
|
|||
} else {
|
||||
nsamples = gst_buffer_get_size (last_buf) / sample_size;
|
||||
}
|
||||
duration = GST_BUFFER_DURATION (last_buf) / nsamples;
|
||||
if (nsamples > 0)
|
||||
duration = GST_BUFFER_DURATION (last_buf) / nsamples;
|
||||
else
|
||||
duration = 0;
|
||||
|
||||
/* timescale = samplerate */
|
||||
scaled_duration = 1;
|
||||
|
|
Loading…
Reference in a new issue