Skip to content

Commit

Permalink
Fix GetLayer method to handle cases with one or fewer elements in the…
Browse files Browse the repository at this point in the history
… list
  • Loading branch information
Vittorio Palmisano committed Feb 21, 2025
1 parent 9b666ec commit 638e790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/include/RTC/Codecs/PayloadDescriptorHandler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace RTC

int16_t GetLayer(uint16_t pictureId) const
{
if (this->list.empty())
if (this->list.size() <= 1)
{
return -1;
}
Expand Down

0 comments on commit 638e790

Please sign in to comment.