subpicture: ensure all subtitle decoders set the b_subtitle flag

It wasn't set in the test decoder callback.
This commit is contained in:
Steve Lhomme 2024-03-27 15:20:18 +01:00
parent 818695182e
commit d8680da9f2
3 changed files with 3 additions and 5 deletions

View File

@ -516,6 +516,8 @@ static inline subpicture_t *decoder_NewSubpicture( decoder_t *dec,
subpicture_t *p_subpicture = dec->cbs->spu.buffer_new( dec, p_dyn );
if( !p_subpicture )
msg_Warn( dec, "can't get output subpicture" );
else
p_subpicture->b_subtitle = true;
return p_subpicture;
}

View File

@ -44,10 +44,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec,
const subpicture_updater_t *p_upd )
{
VLC_UNUSED( p_dec );
subpicture_t *p_subpicture = subpicture_New( p_upd );
if( likely(p_subpicture != NULL) )
p_subpicture->b_subtitle = true;
return p_subpicture;
return subpicture_New( p_upd );
}
static void decoder_queue_sub( decoder_t *p_dec, subpicture_t *p_spu )

View File

@ -953,7 +953,6 @@ static subpicture_t *ModuleThread_NewSpuBuffer( decoder_t *p_dec,
{
p_subpic->i_channel = p_owner->i_spu_channel;
p_subpic->i_order = p_owner->i_spu_order++;
p_subpic->b_subtitle = true;
}
return p_subpic;