vlc | branch: master | Francois Cartegnie <[email protected]> | Wed Jul 5 16:32:31 2017 +0200| [10208fdc2b5043200239d1c86db32f6c272127c3] | committer: Francois Cartegnie
demux: ts: use es_format_Change for Opus > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=10208fdc2b5043200239d1c86db32f6c272127c3 --- modules/demux/mpeg/ts_psi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/demux/mpeg/ts_psi.c b/modules/demux/mpeg/ts_psi.c index c945d51baf..b96077443e 100644 --- a/modules/demux/mpeg/ts_psi.c +++ b/modules/demux/mpeg/ts_psi.c @@ -899,10 +899,13 @@ static void OpusSetup(demux_t *demux, uint8_t *p, size_t len, es_format_t *p_fmt h.channel_mapping = mapping; if (h.channels) { - opus_write_header((uint8_t**)&p_fmt->p_extra, &p_fmt->i_extra, &h, NULL /* FIXME */); - if (p_fmt->p_extra) { - p_fmt->i_cat = AUDIO_ES; - p_fmt->i_codec = VLC_CODEC_OPUS; + uint8_t *p_extra = NULL; + int i_extra = 0; + opus_write_header(&p_extra, &i_extra, &h, NULL /* FIXME */); + if (p_extra) { + es_format_Change(p_fmt, AUDIO_ES, VLC_CODEC_OPUS); + p_fmt->p_extra = p_extra; + p_fmt->i_extra = i_extra; p_fmt->audio.i_channels = h.channels; p_fmt->audio.i_rate = 48000; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
