diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c
index 6f589b9878..6c2a8ed550 100644
--- a/doc/examples/decode_audio.c
+++ b/doc/examples/decode_audio.c
@@ -115,6 +115,9 @@ int main(int argc, char **argv)
size_t data_size;
AVPacket *pkt;
AVFrame *decoded_frame = NULL;
+ enum AVSampleFormat sfmt;
+ int n_channels = 0;
+ const char *fmt;
if (argc <= 2) {
fprintf(stderr, "Usage: %s