asfdemux: fix checking for header objects

The if 'and' condition was mixed up with the last parameter of the
function and would lead to wrong results
This commit is contained in:
Thiago Santos 2017-06-06 21:48:19 -07:00
parent 5a0901baa3
commit 42f8e22f17

View 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;
}