diff options
author | Stian Selnes <stian@pexip.com> | 2016-05-06 13:33:22 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2016-08-26 11:57:15 -0400 |
commit | 5f3b570d53e6b2f87cb8d01f5de62a4a3eacf324 (patch) | |
tree | 4dd91724e3950d9e527567c20e6a6e7a971fa454 /gst/rtp/gstrtph263pdepay.c | |
parent | c7579d31a6e9d788e94b83258309063d0aae481e (diff) |
rtph263pdepay: Don't try to push empty frame
If the result of depayloading is an empty frame, just drop it. This is
likely the result of a buggy payloader.
Diffstat (limited to 'gst/rtp/gstrtph263pdepay.c')
-rw-r--r-- | gst/rtp/gstrtph263pdepay.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/rtp/gstrtph263pdepay.c b/gst/rtp/gstrtph263pdepay.c index c2508b694..82906148b 100644 --- a/gst/rtp/gstrtph263pdepay.c +++ b/gst/rtp/gstrtph263pdepay.c @@ -321,6 +321,9 @@ gst_rtp_h263p_depay_process (GstRTPBaseDepayload * depayload, len = avail + payload_len; padlen = (len % 4) + 4; + if (avail == 0) + goto empty_frame; + outbuf = gst_adapter_take_buffer (rtph263pdepay->adapter, avail); if (padlen) { padbuf = gst_buffer_new_and_alloc (padlen); @@ -355,6 +358,11 @@ waiting_start: GST_DEBUG_OBJECT (rtph263pdepay, "waiting for picture start"); return NULL; } +empty_frame: + { + GST_WARNING_OBJECT (rtph263pdepay, "Depayloaded frame is empty, dropping"); + return NULL; + } } static GstStateChangeReturn |