File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
modules/stream_out/transcode Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -576,22 +576,23 @@ static int transcode_video_encoder_open( sout_stream_t *p_stream,
576
576
void transcode_video_close ( sout_stream_t * p_stream ,
577
577
sout_stream_id_sys_t * id )
578
578
{
579
- if ( p_stream -> p_sys -> i_threads >= 1 )
579
+ if ( p_stream -> p_sys -> i_threads >= 1 && ! p_stream -> p_sys -> b_abort )
580
580
{
581
581
vlc_mutex_lock ( & p_stream -> p_sys -> lock_out );
582
582
p_stream -> p_sys -> b_abort = true;
583
583
vlc_cond_signal ( & p_stream -> p_sys -> cond );
584
584
vlc_mutex_unlock ( & p_stream -> p_sys -> lock_out );
585
585
586
586
vlc_join ( p_stream -> p_sys -> thread , NULL );
587
- vlc_mutex_destroy ( & p_stream -> p_sys -> lock_out );
588
- vlc_cond_destroy ( & p_stream -> p_sys -> cond );
589
587
590
588
picture_fifo_Delete ( p_stream -> p_sys -> pp_pics );
591
589
block_ChainRelease ( p_stream -> p_sys -> p_buffers );
592
590
p_stream -> p_sys -> pp_pics = NULL ;
593
591
}
594
592
593
+ vlc_mutex_destroy ( & p_stream -> p_sys -> lock_out );
594
+ vlc_cond_destroy ( & p_stream -> p_sys -> cond );
595
+
595
596
/* Close decoder */
596
597
if ( id -> p_decoder -> p_module )
597
598
module_unneed ( id -> p_decoder , id -> p_decoder -> p_module );
You can’t perform that action at this time.
0 commit comments