deinterlace: Split out NULL checks in yadif
authorJan Schmidt <jan@centricular.com>
Fri, 8 May 2020 17:09:03 +0000 (03:09 +1000)
committerJan Schmidt <jan@centricular.com>
Fri, 8 May 2020 17:09:03 +0000 (03:09 +1000)
Separate out explicit NULL checks for fields we depend on so
that coverity can hopefully verify dependencies better.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/585>

gst/deinterlace/yadif.c

index fee0e6a..160e9ac 100644 (file)
@@ -290,11 +290,12 @@ filter_scanline_yadif (GstDeinterlaceSimpleMethod * self,
       || s.bbp == NULL) ? 2 : 0;
 
   /* When starting up, some data might not yet be available, so use the current frame */
-  if (s.m1 == NULL) {
-    s.tt1 = s.ttp;
+  if (s.m1 == NULL)
     s.m1 = s.mp;
+  if (s.tt1 == NULL)
+    s.tt1 = s.ttp;
+  if (s.bb1 == NULL)
     s.bb1 = s.bbp;
-  }
   if (s.t2 == NULL)
     s.t2 = s.tp2;
   if (s.b2 == NULL)