flacparse: show meaningful info on frame CRC check

As CRCs are calculated for the comparition already, we
might as well (cheaply) inform the user how the numbers
differ if a missmatched pair is found.

While at it:

Rephrase candidate-frame message to make more sense
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-12-31 11:33:45 -08:00
parent 395afed566
commit df6f0bc595

View file

@ -695,10 +695,12 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse,
guint16 expected_crc = GST_READ_UINT16_BE (map.data + i - 2);
GST_LOG_OBJECT (flacparse,
"checking checksum, frame suspect (%d, %d)",
"Found possible frame (%d, %d). Checking for CRC match",
suspect_start, suspect_end);
if (actual_crc != expected_crc) {
GST_DEBUG_OBJECT (flacparse, "checksum did not match");
GST_DEBUG_OBJECT (flacparse,
"Checksum mismatch. Header CRC was '%d' but frame has '%d'",
expected_crc, actual_crc);
continue;
}
}