[vlc-commits] transcode: remove p_stream ref
Francois Cartegnie
git at videolan.org
Mon Jul 9 16:15:19 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun 21 21:46:48 2018 +0200| [b4cac22023479b842db34c5eda40b4b9b2e1891d] | committer: Francois Cartegnie
transcode: remove p_stream ref
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b4cac22023479b842db34c5eda40b4b9b2e1891d
---
modules/stream_out/transcode/transcode.c | 2 +-
modules/stream_out/transcode/transcode.h | 2 +-
modules/stream_out/transcode/video.c | 11 +++++------
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/stream_out/transcode/transcode.c b/modules/stream_out/transcode/transcode.c
index ea4d3baec9..61b2f6e938 100644
--- a/modules/stream_out/transcode/transcode.c
+++ b/modules/stream_out/transcode/transcode.c
@@ -506,7 +506,7 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
struct decoder_owner * p_owner = vlc_object_create( p_stream, sizeof( *p_owner ) );
if( !p_owner )
goto error;
- p_owner->p_stream = p_stream;
+ p_owner->p_obj = VLC_OBJECT(p_stream);
id->p_decoder = &p_owner->dec;
id->p_decoder->p_module = NULL;
diff --git a/modules/stream_out/transcode/transcode.h b/modules/stream_out/transcode/transcode.h
index 284b4c0970..06232e6612 100644
--- a/modules/stream_out/transcode/transcode.h
+++ b/modules/stream_out/transcode/transcode.h
@@ -127,7 +127,7 @@ struct sout_stream_id_sys_t
struct decoder_owner
{
decoder_t dec;
- sout_stream_t *p_stream;
+ vlc_object_t *p_obj;
sout_stream_id_sys_t *id;
};
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 5f04c89524..3377c02ac0 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -60,12 +60,11 @@ static int video_update_format_decoder( decoder_t *p_dec )
{
struct decoder_owner *p_owner = dec_get_owner( p_dec );
sout_stream_id_sys_t *id = p_owner->id;
- sout_stream_t *stream = p_owner->p_stream;
- sout_stream_sys_t *sys = stream->p_sys;
+ vlc_object_t *p_obj = p_owner->p_obj;
filter_chain_t *test_chain;
filter_owner_t filter_owner = {
- .sys = sys,
+ .sys = id,
};
if( id->p_encoder->fmt_in.i_codec == p_dec->fmt_out.i_codec ||
@@ -75,15 +74,15 @@ static int video_update_format_decoder( decoder_t *p_dec )
id->video_dec_out = p_dec->fmt_out.video;
id->video_dec_out.p_palette = NULL;
- msg_Dbg( stream, "Checking if filter chain %4.4s -> %4.4s is possible",
+ msg_Dbg( p_obj, "Checking if filter chain %4.4s -> %4.4s is possible",
(char *)&p_dec->fmt_out.i_codec, (char*)&id->p_encoder->fmt_in.i_codec );
- test_chain = filter_chain_NewVideo( stream, false, &filter_owner );
+ test_chain = filter_chain_NewVideo( p_obj, false, &filter_owner );
filter_chain_Reset( test_chain, &p_dec->fmt_out, &p_dec->fmt_out );
int chain_works = filter_chain_AppendConverter( test_chain, &p_dec->fmt_out,
&id->p_encoder->fmt_in );
filter_chain_Delete( test_chain );
- msg_Dbg( stream, "Filter chain testing done, input chroma %4.4s seems to be %s for transcode",
+ msg_Dbg( p_obj, "Filter chain testing done, input chroma %4.4s seems to be %s for transcode",
(char *)&p_dec->fmt_out.video.i_chroma,
chain_works == 0 ? "possible" : "not possible");
return chain_works;
More information about the vlc-commits
mailing list