[vlc-commits] sout: transcode: allow to restart with same id
Francois Cartegnie
git at videolan.org
Wed Aug 29 17:11:53 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug 29 15:49:12 2018 +0200| [1e796237506f78d259a1c6b90d6deb0ddc236afd] | committer: Francois Cartegnie
sout: transcode: allow to restart with same id
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e796237506f78d259a1c6b90d6deb0ddc236afd
---
modules/stream_out/transcode/audio.c | 6 ++++--
modules/stream_out/transcode/video.c | 14 +++++++++-----
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index ae357c30f9..9bb91528e1 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -278,7 +278,8 @@ int transcode_audio_process( sout_stream_t *p_stream,
}
}
- if( transcode_audio_filters_init( p_stream,
+ if( !id->p_af_chain &&
+ transcode_audio_filters_init( p_stream,
id->p_filterscfg,
&id->decoder_out.audio,
&transcode_encoder_format_in( id->encoder )->audio,
@@ -298,7 +299,8 @@ int transcode_audio_process( sout_stream_t *p_stream,
goto error;
}
- id->downstream_id =
+ if( !id->downstream_id )
+ id->downstream_id =
id->pf_transcode_downstream_add( p_stream,
&id->p_decoder->fmt_in,
transcode_encoder_format_out( id->encoder ) );
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 00dddbd9ad..24303dcb81 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -496,10 +496,13 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
video_format_Copy( &id->fmt_input_video, &p_pic->format );
- transcode_video_filter_init( p_stream, id->p_filterscfg,
- (id->p_enccfg->video.fps.num > 0), id );
- if( conversion_video_filter_append( id, p_pic ) != VLC_SUCCESS )
- goto error;
+ if( !id->p_f_chain && !id->p_uf_chain )
+ {
+ transcode_video_filter_init( p_stream, id->p_filterscfg,
+ (id->p_enccfg->video.fps.num > 0), id );
+ if( conversion_video_filter_append( id, p_pic ) != VLC_SUCCESS )
+ goto error;
+ }
/* Start missing encoder */
if( !transcode_encoder_opened( id->encoder ) &&
@@ -516,7 +519,8 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
transcode_encoder_format_in( id->encoder )->video.i_width,
transcode_encoder_format_in( id->encoder )->video.i_height );
- id->downstream_id =
+ if( !id->downstream_id )
+ id->downstream_id =
id->pf_transcode_downstream_add( p_stream,
&id->p_decoder->fmt_in,
transcode_encoder_format_out( id->encoder ) );
More information about the vlc-commits
mailing list