$OpenBSD: patch-examples_fpcalc_c,v 1.1 2019/02/18 10:05:39 ajacoutot Exp $

Update for newer FFmpeg API.

Index: examples/fpcalc.c
--- examples/fpcalc.c.orig
+++ examples/fpcalc.c
@@ -126,7 +126,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_
 	remaining = max_length * codec_ctx->channels * codec_ctx->sample_rate;
 	chromaprint_start(chromaprint_ctx, codec_ctx->sample_rate, codec_ctx->channels);
 
-	frame = avcodec_alloc_frame();
+	frame = av_frame_alloc();
 
 	while (1) {
 		if (av_read_frame(format_ctx, &packet) < 0) {
@@ -134,7 +134,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_
 		}
 
 		if (packet.stream_index == stream_index) {
-			avcodec_get_frame_defaults(frame);
+			av_frame_unref(frame);
 
 			got_frame = 0;
 			consumed = avcodec_decode_audio4(codec_ctx, frame, &got_frame, &packet);
@@ -190,7 +190,7 @@ finish:
 
 done:
 	if (frame) {
-		avcodec_free_frame(&frame);
+		av_frame_free(&frame);
 	}
 	if (dst_data[0]) {
 		av_freep(&dst_data[0]);
