[Swfdec] 2 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_net_stream.c

Benjamin Otte company at kemper.freedesktop.org
Tue Mar 20 12:58:45 PDT 2007


 libswfdec/swfdec_bits.c       |    4 +++-
 libswfdec/swfdec_net_stream.c |    8 ++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

New commits:
diff-tree 6363187dd9b03c0c32bbce14ba5de298deb3533d (from 759af095e57187bc8de0a3959e27f9032a37c08f)
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Mar 20 20:58:16 2007 +0100

    no more type punned pointers

diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index e6a38ed..a90ba96 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -336,6 +336,7 @@ swfdec_bits_get_bdouble (SwfdecBits * b)
   double d;
 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
   guint64 tmp;
+  gpointer p;
 #endif
 
   SWFDEC_BYTES_CHECK (b, 8);
@@ -345,7 +346,8 @@ swfdec_bits_get_bdouble (SwfdecBits * b)
 #elif G_BYTE_ORDER == G_LITTLE_ENDIAN
   tmp = *((guint64 *) b->ptr);
   tmp = GUINT64_FROM_BE (tmp);
-  d = *((double *) &tmp);
+  p = &tmp;
+  d = *((double *) p);
 #endif
   b->ptr += 8;
 
diff-tree 759af095e57187bc8de0a3959e27f9032a37c08f (from 3101705919f2a1272a8222ac0cce54f24b34193f)
Author: Benjamin Otte <otte at gnome.org>
Date:   Tue Mar 20 20:38:40 2007 +0100

    don't readd Timeout on EOF

diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c
index e9b251a..09239e2 100644
--- a/libswfdec/swfdec_net_stream.c
+++ b/libswfdec/swfdec_net_stream.c
@@ -164,10 +164,10 @@ swfdec_net_stream_update_playing (Swfdec
 {
   gboolean should_play;
     
-  should_play = stream->playing;
-  should_play &= !stream->buffering;
-  should_play &= stream->flvdecoder != NULL;
-  //should_play &= stream->next_time > stream->current_time;
+  should_play = stream->playing; /* checks user-set play/pause */
+  should_play &= !stream->buffering; /* checks enough data is available */
+  should_play &= stream->flvdecoder != NULL; /* checks there even is something to play */
+  should_play &= stream->next_time > stream->current_time; /* checks if EOF */
   if (should_play && stream->timeout.callback == NULL) {
     SWFDEC_DEBUG ("starting playback");
     stream->timeout.callback = swfdec_net_stream_timeout;


More information about the Swfdec mailing list