Benjamin Otte
2007-Feb-19 14:08 UTC
[Swfdec] 2 commits - libswfdec/swfdec_script.c test/swfdec-extract.c
libswfdec/swfdec_script.c | 3 +++ test/swfdec-extract.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) New commits: diff-tree ba5327ffe305de547d40a282a1d866a2cf9e992e (from 842b4b558af7b8ad68f47fd7473989fc46fd23d6) Author: Benjamin Otte <otte@gnome.org> Date: Mon Feb 19 23:06:14 2007 +0100 Add a warning in CallMethod if a function doesn't exist diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 824861b..f8a9623 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -675,6 +675,9 @@ swfdec_action_call_method (JSContext *cx } else { if (!JS_GetProperty (cx, obj, s, &fun)) return JS_FALSE; + if (!JSVAL_IS_OBJECT (fun)) { + SWFDEC_WARNING ("%s:%s is not a function", JS_GetClass (obj)->name, s); + } } fp->sp--; fp->sp[-1] = fun; diff-tree 842b4b558af7b8ad68f47fd7473989fc46fd23d6 (from 185d07d2ed05ec0bf1970484d27642703177702e) Author: Benjamin Otte <otte@gnome.org> Date: Mon Feb 19 20:56:52 2007 +0100 Add missing \n to print statements diff --git a/test/swfdec-extract.c b/test/swfdec-extract.c index 47e8234..da0964b 100644 --- a/test/swfdec-extract.c +++ b/test/swfdec-extract.c @@ -68,7 +68,7 @@ export_sound (SwfdecSound *sound, const SwfdecBuffer *wav; if (sound->decoded == NULL) { - g_printerr ("not a sound event. For streams use the sprite."); + g_printerr ("not a sound event. For extraction of streams extract the sprite.\n"); return FALSE; } wav = encode_wav (sound->decoded); @@ -97,7 +97,7 @@ export_sprite_sound (SwfdecSprite *sprit break; } if (i >= sprite->n_frames) { - g_printerr ("No sound in sprite %u", SWFDEC_CHARACTER (sprite)->id); + g_printerr ("No sound in sprite %u\n", SWFDEC_CHARACTER (sprite)->id); return FALSE; } audio = swfdec_audio_stream_new (NULL, sprite, i); @@ -185,11 +185,11 @@ export_graphic (SwfdecGraphic *graphic, const SwfdecColorTransform trans = { 256, 0, 256, 0, 256, 0, 256, 0 }; if (SWFDEC_IS_SPRITE (graphic)) { - g_printerr ("Sprites can not be exported"); + g_printerr ("Sprites can not be exported\n"); return FALSE; } if (SWFDEC_IS_BUTTON (graphic)) { - g_printerr ("Buttons can not be exported"); + g_printerr ("Buttons can not be exported\n"); return FALSE; } width = ceil (graphic->extents.x1 / SWFDEC_TWIPS_SCALE_FACTOR)
Reasonably Related Threads
- 7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
- 3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_codec_audio.h test/swfdec-extract.c
- Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
- 9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
- 3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c