asfdemux: fix checking for header objects
authorThiago Santos <thiagossantos@gmail.com>
Wed, 7 Jun 2017 04:48:19 +0000 (21:48 -0700)
committerThiago Santos <thiagossantos@gmail.com>
Wed, 7 Jun 2017 04:48:19 +0000 (21:48 -0700)
The if 'and' condition was mixed up with the last parameter of the
function and would lead to wrong results

gst/asfdemux/gstasfdemux.c

index 5afeaab..2b0fed1 100644 (file)
@@ -2220,9 +2220,10 @@ gst_asf_demux_check_header (GstASFDemux * demux)
   if (cdata == NULL)            /* need more data */
     return GST_ASF_DEMUX_CHECK_HEADER_NEED_DATA;
 
-  if (asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj, FALSE
-          && obj.id == ASF_OBJ_HEADER))
+  if (asf_demux_peek_object (demux, cdata, ASF_OBJECT_HEADER_SIZE, &obj, FALSE)
+      && obj.id == ASF_OBJ_HEADER) {
     return GST_ASF_DEMUX_CHECK_HEADER_YES;
+  }
 
   return GST_ASF_DEMUX_CHECK_HEADER_NO;
 }