OSDN Git Service

api-example: remove an unneeded call to avcodec_get_frame_defaults().
authorAnton Khirnov <anton@khirnov.net>
Mon, 9 Dec 2013 10:55:57 +0000 (11:55 +0100)
committerAnton Khirnov <anton@khirnov.net>
Wed, 11 Dec 2013 19:39:55 +0000 (20:39 +0100)
avcodec_decode_audio4() resets the frame itself.

libavcodec/api-example.c

index 11a4412..6abbddc 100644 (file)
@@ -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) {