rtpbasedepay: fix possible refcounting issue when detecting a discont
authorTim-Philipp Müller <tim@centricular.com>
Fri, 11 Dec 2015 10:25:00 +0000 (10:25 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 11 Dec 2015 10:38:14 +0000 (10:38 +0000)
commit86350ff8b7aee835ea43022e203b52dce7f0c53b
treee36569f41dcc05988c1bdf535a60d35d04c03cef
parent9c2bcd7b768d77a79fe6e4b9b864ec60427d1bef
rtpbasedepay: fix possible refcounting issue when detecting a discont

When we detect a discont and the input buffer isn't already flagged
as discont, handle_buffer() does a gst_buffer_make_writable() on the
input buffer in order to set the flag. This assumed it had ownership
of the input buffer though, which it didn't. This would still work
fine in most scenarios, but could lead to crashes or mini object
unref criticals in some cases when a discont is detected, e.g. when
using pcapparse in front of a depayloader. This problem was
introduced in bc14cdf529e.
gst-libs/gst/rtp/gstrtpbasedepayload.c