[vlc-commits] mosaic_bridge: don't do the SAR fixup in update_format callback
Steve Lhomme
git at videolan.org
Mon Nov 4 10:42:02 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Aug 6 13:53:42 2019 +0200| [17d9babab610a3f4a6ba78f5a3eeeaea03e91b14] | committer: Steve Lhomme
mosaic_bridge: don't do the SAR fixup in update_format callback
It's already done in the decoder helper.
Now we always set p_owner->video to the updated format even if dimensions/SAR
didn't change.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17d9babab610a3f4a6ba78f5a3eeeaea03e91b14
---
modules/stream_out/mosaic_bridge.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 8dd2fef0fb..a1ab2be318 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -86,7 +86,6 @@ static int Send( sout_stream_t *, void *, block_t * );
static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic );
inline static int video_update_format_decoder( decoder_t *p_dec, vlc_video_context * );
inline static picture_t *video_new_buffer_filter( filter_t * );
-static void video_update_format( video_format_t *, es_format_t * );
static int HeightCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
@@ -575,7 +574,7 @@ static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
inline static int video_update_format_decoder( decoder_t *p_dec, vlc_video_context *vctx )
{
struct decoder_owner *p_owner = dec_get_owner( p_dec );
- video_update_format( &p_owner->video, &p_dec->fmt_out );
+ p_owner->video = p_dec->fmt_out.video;
sout_stream_sys_t *p_sys = p_owner->p_stream->p_sys;
if ( p_sys->p_vf2 )
{
@@ -603,23 +602,6 @@ inline static picture_t *video_new_buffer_filter( filter_t *p_filter )
return picture_NewFromFormat( &p_filter->fmt_out.video );
}
-static void video_update_format( video_format_t *video, es_format_t *fmt_out )
-{
- if( fmt_out->video.i_width != video->i_width ||
- fmt_out->video.i_height != video->i_height ||
- fmt_out->video.i_chroma != video->i_chroma ||
- (int64_t)fmt_out->video.i_sar_num * video->i_sar_den !=
- (int64_t)fmt_out->video.i_sar_den * video->i_sar_num )
- {
- vlc_ureduce( &fmt_out->video.i_sar_num,
- &fmt_out->video.i_sar_den,
- fmt_out->video.i_sar_num,
- fmt_out->video.i_sar_den, 0 );
-
- *video = fmt_out->video;
- }
-}
-
/**********************************************************************
* Callback to update (some) params on the fly
**********************************************************************/
More information about the vlc-commits
mailing list