Skip to content

Commit e021c90

Browse files
quariumcmassiot
authored andcommitted
upipe_blit: prevent useless flow format provide
Prevent flow format negotiation when nothing change.
1 parent 9f23f86 commit e021c90

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/upipe-modules/upipe_blit.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/*
22
* Copyright (C) 2014-2017 OpenHeadend S.A.R.L.
3+
* Copyright (C) 2025 EasyTools
34
*
45
* Authors: Sebastien Gougelet
56
* Christophe Massiot
7+
* Arnaud de Turckheim
68
*
79
* Permission is hereby granted, free of charge, to any person obtaining
810
* a copy of this software and associated documentation files (the
@@ -609,6 +611,9 @@ static int _upipe_blit_sub_set_rect(struct upipe *upipe,
609611
uint64_t loffset, uint64_t roffset, uint64_t toffset, uint64_t boffset)
610612
{
611613
struct upipe_blit_sub *sub = upipe_blit_sub_from_upipe(upipe);
614+
if (sub->loffset == loffset && sub->roffset == roffset &&
615+
sub->toffset == toffset && sub->boffset == boffset)
616+
return UBASE_ERR_NONE;
612617
sub->loffset = loffset;
613618
sub->roffset = roffset;
614619
sub->toffset = toffset;
@@ -635,6 +640,11 @@ static int _upipe_blit_sub_set_margin(struct upipe *upipe,
635640
struct urational bmargin)
636641
{
637642
struct upipe_blit_sub *sub = upipe_blit_sub_from_upipe(upipe);
643+
if (!urational_cmp(&sub->lmargin, &lmargin) &&
644+
!urational_cmp(&sub->rmargin, &rmargin) &&
645+
!urational_cmp(&sub->tmargin, &tmargin) &&
646+
!urational_cmp(&sub->bmargin, &bmargin))
647+
return UBASE_ERR_NONE;
638648
sub->lmargin = lmargin;
639649
sub->rmargin = rmargin;
640650
sub->tmargin = tmargin;

0 commit comments

Comments
 (0)