[vlc-devel] [PATCH 04/10] Add additional SPU clock to synchronize secondary subtitles

Roland Bewick roland.bewick at gmail.com
Tue May 7 06:57:08 CEST 2019


On 6/05/2019 2:36 PM, Thomas Guillem wrote:
> Hello,
>
> On Sun, May 5, 2019, at 12:03, Roland Bewick wrote:
>> ---
>>   src/input/decoder.c                 | 15 ++++++---
>>   src/video_output/video_output.c     | 17 ++++++----
>>   src/video_output/vout_internal.h    | 14 ++++----
>>   src/video_output/vout_subpictures.c | 50 +++++++++++++++++------------
>>   4 files changed, 59 insertions(+), 37 deletions(-)
>>
>> diff --git a/src/input/decoder.c b/src/input/decoder.c
>> index b5fe1c2ca3..b699e52a67 100644
>> --- a/src/input/decoder.c
>> +++ b/src/input/decoder.c
>> @@ -612,7 +612,8 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec,
>>           if( p_owner->p_vout )
>>           {
>>               vlc_mutex_lock( &p_owner->lock );
>> -            vout_SetSubpictureClock(p_owner->p_vout, NULL);
>> +            vout_SetSubpictureClock(p_owner->p_vout, NULL,
>> +                                    p_owner->b_secondary);
> I would prefer something like
>   int vout_AddSubpictureClock(vlc_clock_t *);
>   void vout_RemoveSubpictureClock(vlc_clock_t *),
>
> We won't have to change if we need to handle 3 SPUS. The vout can just keep an array of 2 clocks and return an error if it receive a third vout_AddSubpictureClock().

Nice idea - will do.

Thanks,

Roland



More information about the vlc-devel mailing list