<HTML><BODY><p style='margin-top: 0px;' dir="ltr">Thought so, but tried to keep it the same way as was already done. Should I rewrite the patch, and do you think the workaround should be removed from transcode_audio_clean() too?</p>
Wednesday, 20 March 2019, 01:51PM +05:00 from Steve Lhomme <a href="mailto:robux4@ycbcr.xyz">robux4@ycbcr.xyz</a>:<br><br><blockquote id="mail-app-auto-quote" style="border-left:1px solid #FC2C38; margin:0px 0px 0px 10px; padding:0px 0px 0px 10px;" cite="15530718840000000535">
<div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div >
<base target="_self" href="https://e-aj.my.com/" />
<div id="style_15530718840000000535_BODY">Hi,<br>
<br>
I think the proper way would be to let DeleteSoutStreamID() do the <br>
decoder cleaning and not to it in transcode_*_clean() at all.<br>
<br>
On 3/19/2019 9:59 PM, <a href="mailto:chishtiawais511@gmail.com">chishtiawais511@gmail.com</a> wrote:<br>
> From: Awais Chishti <<a href="mailto:chishtiawais511@gmail.com">chishtiawais511@gmail.com</a>><br>
><br>
> The function Del() in modules/stream_out/transcode/transcode.c is calling module_unneed() once in the transcode_*_clean() functions and then again in the last DeleteSoutStreamID() call after which VLC crashes. It seems that a workaround is implemented in only transcode_audio_clean(), which the patch repeats for the remaining transcode_*_clean() functions.<br>
> ---<br>
> modules/stream_out/transcode/spu.c | 4 ++++<br>
> modules/stream_out/transcode/video.c | 3 +++<br>
> 2 files changed, 7 insertions(+)<br>
><br>
> diff --git a/modules/stream_out/transcode/spu.c b/modules/stream_out/transcode/spu.c<br>
> index b491774241..d201af99f1 100644<br>
> --- a/modules/stream_out/transcode/spu.c<br>
> +++ b/modules/stream_out/transcode/spu.c<br>
> @@ -159,11 +159,15 @@ int transcode_spu_init( sout_stream_t *p_stream, const es_format_t *p_fmt,<br>
> void transcode_spu_clean( sout_stream_t *p_stream, sout_stream_id_sys_t *id)<br>
> {<br>
> VLC_UNUSED(p_stream);<br>
> +<br>
> /* Close decoder */<br>
> if( id->p_decoder->p_module )<br>
> module_unneed( id->p_decoder, id->p_decoder->p_module );<br>
> + id->p_decoder->p_module = NULL;<br>
> +<br>
> if( id->p_decoder->p_description )<br>
> vlc_meta_Delete( id->p_decoder->p_description );<br>
> + id->p_decoder->p_description = NULL;<br>
> <br>
> /* Close encoder */<br>
> if( id->encoder )<br>
> diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c<br>
> index 24556e1b2d..7ebc9436d8 100644<br>
> --- a/modules/stream_out/transcode/video.c<br>
> +++ b/modules/stream_out/transcode/video.c<br>
> @@ -313,8 +313,11 @@ void transcode_video_clean( sout_stream_t *p_stream,<br>
> /* Close decoder */<br>
> if( id->p_decoder->p_module )<br>
> module_unneed( id->p_decoder, id->p_decoder->p_module );<br>
> + id->p_decoder->p_module = NULL;<br>
> +<br>
> if( id->p_decoder->p_description )<br>
> vlc_meta_Delete( id->p_decoder->p_description );<br>
> + id->p_decoder->p_description = NULL;<br>
> <br>
> /* Close encoder */<br>
> transcode_encoder_close( id->encoder );<br>
> -- <br>
> 2.21.0<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank" >https://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank" >https://mailman.videolan.org/listinfo/vlc-devel</a></div>
<base target="_self" href="https://e-aj.my.com/" />
</div>
</div>
</blockquote></BODY></HTML>