diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c
index 11a4412abbf3d9d26e763bea592700db21e6ec04..6abbddc7a7a5f468f513acc29d93339f06bcfadb 100644
--- a/libavcodec/api-example.c
+++ b/libavcodec/api-example.c
@@ -272,8 +272,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
                 fprintf(stderr, "out of memory\n");
                 exit(1);
             }
-        } else
-            avcodec_get_frame_defaults(decoded_frame);
+        }
 
         len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
         if (len < 0) {