Skip to content

Commit

Permalink
make sure audio_stream is always initialized by SmackOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
BSzili committed Aug 11, 2024
1 parent 361eca4 commit f925b5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/smackw32/smackw32.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Smack* SmackOpen(const char* name, uint32_t flags, uint32_t extrabuf) {
// get info about the audio tracks in this video
smk_info_audio(smk_handle, &track_mask_smk, channels_smk, bitdepth_smk, sample_rate_smk);

smack->audio_stream = NULL;
if ((track_mask_smk & SMK_AUDIO_TRACK_0)) {
smack->audio_stream = AudioBackend_StreamOpen(bitdepth_smk[0], channels_smk[0], sample_rate_smk[0]);
if (smack->audio_stream != NULL) {
Expand Down

0 comments on commit f925b5a

Please sign in to comment.