diff options
author | Thong Thai <thong.thai@amd.com> | 2022-11-09 14:24:56 -0500 |
---|---|---|
committer | Leo Liu <leo.liu@amd.com> | 2022-11-09 14:30:07 -0500 |
commit | ee23236088a603187084688368a5931012d57483 (patch) | |
tree | 6c9e6fa377c05c48fe3b6a9a9e0a11bb97106b9c | |
parent | 8b37f6589ed655af5e6d66d8764ffd57c2db2efb (diff) |
Signed-off-by: Thong Thai <thong.thai@amd.com>
-rw-r--r-- | omx/gstomxvideoenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c index 2f5a7ca..d01acf9 100644 --- a/omx/gstomxvideoenc.c +++ b/omx/gstomxvideoenc.c @@ -1056,6 +1056,12 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self) GST_VIDEO_ENCODER_STREAM_LOCK (self); frame = gst_omx_video_enc_find_nearest_frame (self, buf); + if (!frame) { + GST_WARNING_OBJECT (self, "No best frame has been found"); + gst_omx_port_release_buffer (self->enc_out_port, buf); + goto flow_error; + } + GST_INFO_OBJECT (self, "dts %" GST_TIME_FORMAT " pts %" GST_TIME_FORMAT, GST_TIME_ARGS(frame->dts), GST_TIME_ARGS(frame->pts)); |