From: Andriy Gelman <andriy.gel...@gmail.com> 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. This is fixed in the commit.
For reference the declaration of the function from chromaprint.h is: int chromaprint_get_raw_fingerprint(ChromaprintContext *ctx, uint32_t **fingerprint, int *size); --- libavformat/chromaprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c index a4c0b97d99..faa92ca0db 100644 --- a/libavformat/chromaprint.c +++ b/libavformat/chromaprint.c @@ -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: -- 2.23.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".