generic-pc: avoid segfault

Origin commit data
------------------
Branch: master
Commit: 43f0dfac27
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-05-09 (Thu, 09 May 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-05-09 18:05:59 +02:00
committed by max_10
parent 2601f11e53
commit 75f3286fe5

View File

@@ -472,7 +472,8 @@ void cAudio::run()
hal_debug("%s: pts 0x%" PRIx64 " %3f\n", __func__, curr_pts, curr_pts/90000.0); hal_debug("%s: pts 0x%" PRIx64 " %3f\n", __func__, curr_pts, curr_pts/90000.0);
int o_buf_sz = av_samples_get_buffer_size(&out_linesize, o_ch, int o_buf_sz = av_samples_get_buffer_size(&out_linesize, o_ch,
obuf_sz, AV_SAMPLE_FMT_S16, 1); obuf_sz, AV_SAMPLE_FMT_S16, 1);
ao_play(adevice, (char *)obuf, o_buf_sz); if (o_buf_sz > 0)
ao_play(adevice, (char *)obuf, o_buf_sz);
} }
av_packet_unref(&avpkt); av_packet_unref(&avpkt);
} }