[vlc-devel] [PATCH 1/3] transcode: video: use a function to encode a filtered picture
Steve Lhomme
robux4 at ycbcr.xyz
Wed Oct 7 14:02:25 CEST 2020
---
modules/stream_out/transcode/video.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index dd3093a9692..e699a558145 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -433,6 +433,20 @@ static void tag_last_block_with_flag( block_t **out, int i_flag )
}
}
+static void encode_filtered( sout_stream_id_sys_t *id, block_t **out, picture_t *p_in )
+{
+ /* Blend subpictures */
+ p_in = RenderSubpictures( id, p_in );
+
+ if( p_in )
+ {
+ block_t *p_encoded = transcode_encoder_encode( id->encoder, p_in );
+ if( p_encoded )
+ block_ChainAppend( out, p_encoded );
+ picture_Release( p_in );
+ }
+}
+
int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
block_t *in, block_t **out )
{
@@ -597,16 +611,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
if( !p_in )
break;
- /* Blend subpictures */
- p_in = RenderSubpictures( id, p_in );
-
- if( p_in )
- {
- block_t *p_encoded = transcode_encoder_encode( id->encoder, p_in );
- if( p_encoded )
- block_ChainAppend( out, p_encoded );
- picture_Release( p_in );
- }
+ encode_filtered( id, out, p_in );
}
}
--
2.26.2
More information about the vlc-devel
mailing list