souphttpsrc: Reset retry_count to 0 when GST_FLOW_FLUSHING
authorpaul.kim <paul.hyunil@lge.com>
Sat, 11 Nov 2017 04:49:22 +0000 (13:49 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Fri, 19 Jan 2018 09:40:07 +0000 (11:40 +0200)
If a lot of seek method is called very quickly, sometimes data reading
and do_request occurs while seek flush event is occurring and error
occurs because retry_count
reaches to the max. Thus, reset retry_count if flush occurs after
do_request and read_buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=790199

ext/soup/gstsouphttpsrc.c

index 9756924..28642e3 100644 (file)
@@ -1835,6 +1835,13 @@ done:
       goto retry;
     }
   }
+
+  if (ret == GST_FLOW_FLUSHING) {
+    g_mutex_lock (&src->mutex);
+    src->retry_count = 0;
+    g_mutex_unlock (&src->mutex);
+  }
+
   return ret;
 }