diff options
Diffstat (limited to 'libhb/encvorbis.c')
-rw-r--r-- | libhb/encvorbis.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c index ce27ea021..f483a097f 100644 --- a/libhb/encvorbis.c +++ b/libhb/encvorbis.c @@ -68,6 +68,12 @@ int encvorbisInit( hb_work_object_t * w, hb_job_t * job ) } /* init */ + for( i = 0; i < 3; i++ ) + { + // Zero vorbis headers so that we don't crash in mk_laceXiph + // when vorbis_encode_setup_managed fails. + memset( w->config->vorbis.headers[i], 0, sizeof( ogg_packet ) ); + } vorbis_info_init( &pv->vi ); if( vorbis_encode_setup_managed( &pv->vi, pv->out_discrete_channels, audio->config.out.samplerate, -1, 1000 * audio->config.out.bitrate, -1 ) ) |