Always destroy in reverse order

For consistency and safety, always destroy objects in reverse order they
were initialized.
This commit is contained in:
Romain Vimont 2017-12-18 16:26:38 +01:00
parent de106747b6
commit a005df7b37

View file

@ -36,8 +36,8 @@ error_0:
} }
void frames_destroy(struct frames *frames) { void frames_destroy(struct frames *frames) {
SDL_DestroyMutex(frames->mutex);
SDL_DestroyCond(frames->rendering_frame_consumed_cond); SDL_DestroyCond(frames->rendering_frame_consumed_cond);
SDL_DestroyMutex(frames->mutex);
av_frame_free(&frames->rendering_frame); av_frame_free(&frames->rendering_frame);
av_frame_free(&frames->decoding_frame); av_frame_free(&frames->decoding_frame);
} }