Skip to content

Commit a25ee50

Browse files
authored
make sure audio_stream is always initialized by SmackOpen (#407)
1 parent 361eca4 commit a25ee50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/smackw32/smackw32.c

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Smack* SmackOpen(const char* name, uint32_t flags, uint32_t extrabuf) {
5050
// get info about the audio tracks in this video
5151
smk_info_audio(smk_handle, &track_mask_smk, channels_smk, bitdepth_smk, sample_rate_smk);
5252

53+
smack->audio_stream = NULL;
5354
if ((track_mask_smk & SMK_AUDIO_TRACK_0)) {
5455
smack->audio_stream = AudioBackend_StreamOpen(bitdepth_smk[0], channels_smk[0], sample_rate_smk[0]);
5556
if (smack->audio_stream != NULL) {

0 commit comments

Comments
 (0)