[Swfdec] Youtube broken by 89d295a94
Pavel Roskin
proski at gnu.org
Wed Sep 26 10:10:54 PDT 2007
Hello!
The current swfdec from git won't play videos on youtube. I had
bisected the change. 8fc53e76 ("merge the too get_variable functions")
is the last good revision. 89d295a94 ("implement
swfdec_action_get_movie_by_path() and use it for GetVariable") is
broken.
Broken revisions show "share" and "watch" on blinking white background
with two labels saying "_level0" instead of "From:" and "Views:".
This can be tested simply by running "swfplay player2.swf", where
player2.swf comes from http://www.youtube.com/player2.swf
This patch restores Youtube support in the git head, but it's just a
hack.
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 5dc9a24..e94b835 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -578,6 +578,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat
val = swfdec_as_stack_peek (cx, 1);
s = swfdec_as_value_to_string (cx, val);
+ swfdec_as_context_eval (cx, NULL, s, val);
if (swfdec_action_get_movie_by_path (cx, s, &object, &s)) {
if (object) {
if (s) {
@@ -589,7 +590,7 @@ swfdec_action_get_variable (SwfdecAsContext *cx, guint action, const guint8 *dat
swfdec_as_frame_get_variable (cx->frame, swfdec_as_context_get_string (cx, s), val);
}
} else {
- SWFDEC_AS_VALUE_SET_UNDEFINED (val);
+// SWFDEC_AS_VALUE_SET_UNDEFINED (val);
#ifdef SWFDEC_WARN_MISSING_PROPERTIES
SWFDEC_WARNING ("no variable named %s", s);
#endif
--
Regards,
Pavel Roskin
More information about the Swfdec
mailing list