]> granicus.if.org Git - handbrake/commitdiff
libhb: fix buffer list size calculation
authorJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 17 May 2016 15:22:06 +0000 (09:22 -0600)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Tue, 17 May 2016 15:22:06 +0000 (09:22 -0600)
libhb/common.c

index aef60cc279f6b92eced72737cc1b669d6c952183..45f46b13770f18ee6524fe6981d75d8184b56e5c 100644 (file)
@@ -2689,8 +2689,8 @@ void hb_buffer_list_append(hb_buffer_list_t *list, hb_buffer_t *buf)
     size += buf->size;
     while (end != NULL && end->next != NULL)
     {
-        size += end->size;
         end = end->next;
+        size += end->size;
         count++;
     }
     if (list->tail == NULL)
@@ -2722,8 +2722,8 @@ void hb_buffer_list_prepend(hb_buffer_list_t *list, hb_buffer_t *buf)
     size += buf->size;
     while (end != NULL && end->next != NULL)
     {
-        size += end->size;
         end = end->next;
+        size += end->size;
         count++;
     }
     if (list->tail == NULL)