summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2018-03-05 13:49:18 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2018-03-05 13:50:08 -0500
commit4e9dca0761b05ba5b0ea6046a040cbc742f38e3e (patch)
treef8c41259097ac78c0a029d157646877c751db0f1
parentfb455242e9320e46ce19e65b53f51fe43fbe2b82 (diff)
downloadgst-omx-4e9dca0761b05ba5b0ea6046a040cbc742f38e3e.tar.gz
omxvideoenc: Don't drop the frame on empty payload
This otherwise may lead to "No reference frame found" warning.
-rw-r--r--omx/gstomxvideoenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 192761b..ff8efcf 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -1340,7 +1340,9 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
flow_ret = gst_pad_push (GST_VIDEO_ENCODER_SRC_PAD (self), outbuf);
}
} else if (frame != NULL) {
- flow_ret = gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (self), frame);
+ /* Just ignore empty buffers, don't drop a frame for that */
+ flow_ret = GST_FLOW_OK;
+ gst_video_codec_frame_unref (frame);
}
return flow_ret;