Commit b5afcbe3 for libheif

commit b5afcbe3c94ed1416fd0fe60d14789f12bfdffd0
Author: Dirk Farin <dirk.farin@gmail.com>
Date:   Mon Dec 15 18:51:03 2025 +0100

    [BSD3] if file has a sequence brand, prefer that over the image brand

diff --git a/libheif/brands.cc b/libheif/brands.cc
index 58ac56e2..ab8acb67 100644
--- a/libheif/brands.cc
+++ b/libheif/brands.cc
@@ -139,7 +139,6 @@ std::vector<heif_brand2> compute_compatible_brands(const HeifContext* ctx, heif_
     }
   }

-
   // --- --- sequences

   if (ctx->has_sequence()) {
@@ -156,9 +155,8 @@ std::vector<heif_brand2> compute_compatible_brands(const HeifContext* ctx, heif_
     if (track_brand != 0) {
       compatible_brands.push_back(track_brand);

-      if (*out_main_brand == 0) {
-        *out_main_brand = track_brand;
-      }
+      // overwrite any image brand
+      *out_main_brand = track_brand;
     }

     // if we don't have a track brand, use at least the sequence structural brand