Commit e14f5fd0 authored by Andriy Gelman's avatar Andriy Gelman Committed by Gyan Doshi

avformat/chromaprint: Fix writing raw fingerprint

The pointer fp after the call to chromaprint_get_raw_fingerpoint() points to an array
of uint32_t whereas the current code assumed just a char stream. Thus when writing the
raw fingerprint, the output would be truncated by a factor of 4.

For reference the declaration of the function from chromaprint.h is:
int chromaprint_get_raw_fingerprint(ChromaprintContext *ctx, uint32_t **fingerprint, int *size);
parent 29dac292
......@@ -136,7 +136,7 @@ static int write_trailer(AVFormatContext *s)
switch (cpr->fp_format) {
case FINGERPRINT_RAW:
avio_write(pb, fp, size);
avio_write(pb, fp, size * 4); //fp points to array of uint32_t
break;
case FINGERPRINT_COMPRESSED:
case FINGERPRINT_BASE64:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment