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