avcodec_decode_audio4() resets the frame itself.
Unified · Split
| @@ -272,8 +272,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 271 unmodified lines | ||
| 272 | 272 | fprintf(stderr, "out of memory\n"); |
| 273 | 273 | exit(1); |
| 274 | 274 | } |
| 275 | − } else | |
| 276 | − avcodec_get_frame_defaults(decoded_frame); | |
| 275 | + } | |
| 277 | 276 | |
| 278 | 277 | len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt); |
| 279 | 278 | if (len < 0) { |