From df6f0bc5956c4d6c9be576fcaa757b02793505b3 Mon Sep 17 00:00:00 2001 From: "Reynaldo H. Verdejo Pinochet" Date: Thu, 31 Dec 2015 11:33:45 -0800 Subject: [PATCH] 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 --- gst/audioparsers/gstflacparse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index ace3cfb99d..9e89446d2f 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -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; } }