5bf1f5
# HG changeset patch
5bf1f5
# Parent  381102061fccdec40efda75c7423a766f68201ba
5bf1f5
Bug-behavior: Youtube-videos using VP9 and opus as audio-codec started loading but did not play
5bf1f5
Reason: While parsing the audio-stream, the sampling frequency (short rate) was wrongly parsed by
5bf1f5
        nestegg, returning 0 all the time. This led to the audio-track reporting that it neither had 
5bf1f5
        valid video nor audio. Which led to an endless-loop in the video state machine.
5bf1f5
Solution: Correct parsing of rate in nestegg, which is a float and cuts of bytes.
5bf1f5
Link: https://github.com/kinetiknz/nestegg/issues/64
5bf1f5
5bf1f5
diff -r 381102061fcc -r 8da4be020b1e media/libnestegg/src/nestegg.c
5bf1f5
--- a/media/libnestegg/src/nestegg.c	Tue Aug 13 07:51:27 2019 +0200
5bf1f5
+++ b/media/libnestegg/src/nestegg.c	Tue Aug 20 07:59:54 2019 +0200
5bf1f5
@@ -768,7 +768,15 @@
5bf1f5
 {
5bf1f5
   union {
5bf1f5
     uint64_t u;
5bf1f5
-    float f;
5bf1f5
+    struct {
5bf1f5
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
5bf1f5
+      uint32_t _pad;
5bf1f5
+      float f;
5bf1f5
+#else
5bf1f5
+      float f;
5bf1f5
+      uint32_t _pad;
5bf1f5
+#endif
5bf1f5
+    } f;
5bf1f5
     double d;
5bf1f5
   } value;
5bf1f5
   int r;
5bf1f5
@@ -780,7 +788,7 @@
5bf1f5
   if (r != 1)
5bf1f5
     return r;
5bf1f5
   if (length == 4)
5bf1f5
-    *val = value.f;
5bf1f5
+    *val = value.f.f;
5bf1f5
   else
5bf1f5
     *val = value.d;
5bf1f5
   return 1;