omxvideoenc: fix warning
authorStéphane Cerveau <scerveau@collabora.com>
Wed, 15 Jan 2020 11:06:12 +0000 (11:06 +0000)
committerStéphane Cerveau <scerveau@collabora.com>
Thu, 16 Jan 2020 09:09:23 +0000 (10:09 +0100)
Fix warning test when OMX_BUFFERFLAG_ENDOFFRAME
is not set.

omx/gstomxvideoenc.c

index b8db1ff..7576286 100644 (file)
@@ -1524,9 +1524,10 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
         frame->output_buffer = outbuf;
         flow_ret =
             gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (self), frame);
-        if (buf->omx_buf->nFlags | ~OMX_BUFFERFLAG_ENDOFFRAME)
+        if (!(buf->omx_buf->nFlags & OMX_BUFFERFLAG_ENDOFFRAME))
           GST_WARNING_OBJECT (self,
-              "OMX_BUFFERFLAG_ENDOFFRAME is missing flags");
+              "OMX_BUFFERFLAG_ENDOFFRAME is missing in flags 0x%x",
+              (guint) buf->omx_buf->nFlags);
       } else {
         flow_ret =
             gst_video_encoder_finish_subframe (GST_VIDEO_ENCODER (self), frame);