if (s && gst_structure_has_name (s, "audio/x-raw") && buf != NULL
&& (GST_BUFFER_OFFSET (buf) == 0 || !GST_BUFFER_OFFSET_IS_VALID (buf))) {
GstTypeFindProbability prob;
- GstCaps *tf_caps;
+ GstCaps *tf_caps, *dts_caps;
+ dts_caps = gst_caps_from_string ("audio/x-dts");
tf_caps =
- gst_type_find_helper_for_buffer_with_extension (GST_OBJECT (wav), buf,
- "dts", &prob);
+ gst_type_find_helper_for_buffer_with_caps (GST_OBJECT (wav), buf,
+ dts_caps, &prob);
if (tf_caps != NULL) {
GST_LOG ("typefind caps = %" GST_PTR_FORMAT ", P=%d", tf_caps, prob);
if (gst_wavparse_have_dts_caps (tf_caps, prob)) {
gst_caps_unref (tf_caps);
}
}
+ gst_caps_unref (dts_caps);
}
gst_pad_set_caps (wav->srcpad, wav->caps);