Displaying 20 results from an estimated 168 matches for "swfdec_error".
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
.../* decode next action */
action = *pc;
- spec = actions + action;
+ spec = swfdec_as_actions + action;
if (action == 0)
break;
if (action & 0x80) {
@@ -405,8 +392,9 @@ start:
}
/* check action is valid */
if (spec->exec[version] == NULL) {
- SWFDEC_ERROR ("cannot interpret action %u %s for version %u", action,
- spec->name ? spec->name : "Unknown", script->version);
+ SWFDEC_ERROR ("cannot interpret action %3u 0x%02X %s for version %u", action,
+ action, spec->name ? spec->name : "Unknown&q...
2007 Apr 05
0
configure.ac libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_gst.c
...ideoCodec swfdec_cod
extern const SwfdecVideoCodec swfdec_codec_ffmpeg_screen;
#endif
-extern const SwfdecVideoCodec swfdec_codec_screen;
+extern const SwfdecVideoCodec swfdec_codec_gst_h263;
/*** UNCOMPRESSED SOUND ***/
@@ -157,12 +158,16 @@ swfdec_codec_get_video (SwfdecVideoForma
SWFDEC_ERROR ("Screen video requires ffmpeg");
return NULL;
case SWFDEC_VIDEO_FORMAT_H263:
+#ifdef HAVE_GST
+ return &swfdec_codec_gst_h263;
+#else
#ifdef HAVE_FFMPEG
return &swfdec_codec_ffmpeg_h263;
#else
- SWFDEC_ERROR ("H263 video requires ffmpeg");...
2007 Apr 18
2
libswfdec/jpeg
libswfdec/jpeg/jpeg_rgb_decoder.c | 1 -
1 files changed, 1 deletion(-)
New commits:
diff-tree 15ed4a69b4ffc265fe103ba79a0b60af7e42a9fa (from 2073f39bc0b0aa90f1f67def9bb3f0c6b68018ae)
Author: Benjamin Otte <otte@gnome.org>
Date: Wed Apr 18 10:47:06 2007 +0200
remove leftover debugging statement
diff --git a/libswfdec/jpeg/jpeg_rgb_decoder.c b/libswfdec/jpeg/jpeg_rgb_decoder.c
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...tic inline JSBool
+swfdec_script_ensure_stack (JSContext *cx, guint n_elements)
+{
+ JSStackFrame *fp = cx->fp;
+ guint current = (guint) (fp->sp - fp->spbase);
+
+ if (current >= n_elements)
+ return JS_TRUE;
+
+ if (n_elements > (guint) (fp->spend - fp->spbase)) {
+ SWFDEC_ERROR ("FIXME: implement stack expansion, we got an overflow (want %u, have %u)",
+ n_elements, (fp->spend - fp->spbase));
+ return JS_FALSE;
+ }
+
+ if (current) {
+ n_elements -= current;
+ memmove (fp->spbase + n_elements, fp->spbase, (fp->sp - fp->spbase) * size...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...line_bits = %d", shape->n_line_bits);
+ swfdec_bits_init_bits (&s->b, &save_bits, size);
swfdec_shape_get_recs (s, shape, swfdec_pattern_parse, swfdec_stroke_parse);
swfdec_bits_syncbits (&s->b);
- if (swfdec_bits_skip_bytes (&save_bits, size) != size) {
- SWFDEC_ERROR ("invalid offset value, not enough bytes available");
- }
- if (swfdec_bits_left (&save_bits) != swfdec_bits_left (&s->b)) {
- SWFDEC_WARNING ("parsing shape did use %d bytes too much\n",
- (swfdec_bits_left (&save_bits) - swfdec_bits_left (&s->b)) / 8...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...quot;, NULL },
[0x20] = { "SetTarget2", NULL },
[0x21] = { "StringAdd", NULL },
@@ -604,8 +618,9 @@ validate_action (guint action, const gui
/* ensure there's a function to execute this opcode, otherwise fail */
if (actions[action].exec[version] == NULL) {
- SWFDEC_ERROR ("no opcode for %u %s", action,
- actions[action].name ? actions[action].name : "Unknown");
+ SWFDEC_ERROR ("no function for %u %s in v%u", action,
+ actions[action].name ? actions[action].name : "Unknown",
+ script->version);
return FALSE;
}...
2007 Apr 08
0
libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c
...>size), buf->size);
+ swfdec_buffer_queue_push (player->out, buffer);
+ g_cond_signal (player->cond);
+ g_mutex_unlock (player->mutex);
+}
+
+static void
+swfdec_audio_decoder_gst_link (GstElement *src, GstPad *pad, GstElement *sink)
+{
+ if (!gst_element_link (src, sink)) {
+ SWFDEC_ERROR ("no delayed link");
+ }
+}
+
+GstBusSyncReply
+swfdec_audio_decoder_gst_handle_bus (GstBus *bus, GstMessage *message, gpointer data)
+{
+ SwfdecGstAudio *player = data;
+
+ switch (message->type) {
+ case GST_MESSAGE_EOS:
+ case GST_MESSAGE_ERROR:
+ g_mutex_lock (player-...
2007 Nov 22
0
5 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_debugger.c libswfdec/swfdec_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field.c
...get_string_with_version (&bits, cx->version);
- target = swfdec_bits_get_string_with_version (&bits, cx->version);
+ url = swfdec_bits_get_string (&bits, cx->version);
+ target = swfdec_bits_get_string (&bits, cx->version);
if (url == NULL || target == NULL) {
SWFDEC_ERROR ("not enough data in GetURL");
g_free (url);
@@ -1797,7 +1797,7 @@ swfdec_action_define_function (SwfdecAsContext *cx, guint action,
frame = cx->frame;
swfdec_bits_init_data (&bits, data, len);
- function_name = swfdec_bits_get_string_with_version (&bits, cx->v...
2007 Mar 28
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_sprite.c libswfdec/swfdec_tag.c
...git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index ff863cc..46b0581 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -32,6 +32,25 @@
#include "swfdec_rect.h"
+#define SWFDEC_BITS_CHECK(b,n) G_STMT_START { \
+ if (swfdec_bits_left(b) < (n)) { \
+ SWFDEC_ERROR ("reading past end of buffer"); \
+ b->ptr = b->end; \
+ b->idx = 0; \
+ return 0; \
+ } \
+}G_STMT_END
+#define SWFDEC_BYTES_CHECK(b,n) G_STMT_START { \
+ g_assert (b->end >= b->ptr); \
+ g_assert (b->idx == 0); \
+ if ((unsigned long) (b->end - b->...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...ception is cleared or we
- // run out of blocks
- while (context->exception && frame->blocks->len > 0) {
- frame->pc = frame->block_end;
- swfdec_as_frame_check_block (frame);
- pc = frame->pc;
- }
if (context->exception) {
- SWFDEC_ERROR ("Unhandled exception");
- goto error;
+ swfdec_as_frame_handle_exception (frame);
+ if (frame != context->frame)
+ goto start;
++ pc = frame->pc;
+ continue;
}
if (check_block && (pc < frame->block_start || pc >= frame->...
2007 Oct 26
0
6 commits - configure.ac libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c player/swfplay.c
...NULL;
+ srcpad = gst_pad_new ("src", GST_PAD_SRC);
+ if (!gst_pad_set_caps (srcpad, caps))
+ goto error;
+ if (gst_pad_link (srcpad, sinkpad) != GST_PAD_LINK_OK)
+ goto error;
+
+ gst_object_unref (sinkpad);
+ gst_pad_set_active (srcpad, TRUE);
+ return srcpad;
+
+error:
+ SWFDEC_ERROR ("failed to create or link srcpad");
+ gst_object_unref (sinkpad);
+ gst_object_unref (srcpad);
+ return NULL;
}
-static void
-swfdec_audio_decoder_gst_fakesrc_handoff (GstElement *fakesrc, GstBuffer *buf,
- GstPad *pad, SwfdecGstAudio *player)
+static GstPad *
+swfdec_gst_conne...
2007 Jan 18
0
Branch 'interpreter' - 2 commits - libswfdec/js libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...fdec_movie.h"
+#include "swfdec_root_movie.h"
static SwfdecMovie *
swfdec_action_get_target (JSContext *cx)
@@ -45,9 +47,91 @@ swfdec_action_stop (JSContext *cx, guint
SwfdecMovie *movie = swfdec_action_get_target (cx);
if (movie)
movie->stopped = TRUE;
+ else
+ SWFDEC_ERROR ("no movie to stop");
return JS_TRUE;
}
+static JSBool
+swfdec_action_play (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecMovie *movie = swfdec_action_get_target (cx);
+ if (movie)
+ movie->stopped = FALSE;
+ else
+ SWFDEC_ERROR ("no movie t...
2007 Feb 01
0
Branch 'interpreter' - libswfdec/swfdec_script.c
..._value_to_frame (JSContext *cx, SwfdecMovie *movie, jsval val)
+{
+ int frame;
+
+ if (JSVAL_IS_STRING (val)) {
+ const char *name = swfdec_js_to_string (cx, val);
+ if (name == NULL ||
+ !SWFDEC_IS_SPRITE_MOVIE (movie))
+ return -1;
+ if (strchr (name, ':')) {
+ SWFDEC_ERROR ("FIXME: handle targets");
+ }
+ frame = swfdec_sprite_get_frame (SWFDEC_SPRITE_MOVIE (movie)->sprite, name);
+ } else {
+ /* FIXME: how do we treat undefined etc? */
+ frame = swfdec_action_to_number (cx, val);
+ }
+ return frame;
+}
+
static JSBool
swfdec_action_goto...
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...}
- for (i = 0; i < n_envelopes; i++) {
- SwfdecSoundEnvelope envelope;
+ for (i = 0; i < chunk->n_envelopes; i++) {
+ chunk->envelope[i].offset = swfdec_bits_get_u32 (b);
+ if (i > 0 && chunk->envelope[i-1].offset > chunk->envelope[i].offset) {
+ SWFDEC_ERROR ("unordered sound envelopes");
+ chunk->envelope[i].offset = chunk->envelope[i-1].offset;
+ }
- envelope.offset = swfdec_bits_get_u32 (b);
for (j = 0; j < 2; j++) {
- envelope.volume[j] = swfdec_bits_get_u16 (b);
- if (envelope.volume[j] > 32768) {...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...c_get_audio (SwfdecAudioForma
}
}
-const SwfdecVideoCodec *
-swfdec_codec_get_video (SwfdecVideoFormat format)
-{
- switch (format) {
- case SWFDEC_VIDEO_FORMAT_SCREEN:
- return &swfdec_codec_screen;
-#ifdef HAVE_FFMPEG
- return &swfdec_codec_ffmpeg_video;
-#endif
- SWFDEC_ERROR ("Screen video requires ffmpeg");
- return NULL;
- case SWFDEC_VIDEO_FORMAT_H263:
-#ifdef HAVE_GST
- return &swfdec_codec_gst_video;
-#else
-#ifdef HAVE_FFMPEG
- return &swfdec_codec_ffmpeg_video;
-#else
- SWFDEC_ERROR ("H263 video requires ffmpeg or GS...
2007 Jun 06
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_root_sprite.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h libswfdec/swfdec_tag.c
...or (i = 0; i < count && swfdec_bits_left (bits); i++) {
- guint id;
- SwfdecCharacter *object;
- char *name;
- id = swfdec_bits_get_u16 (bits);
- object = swfdec_swf_decoder_get_character (s, id);
- name = swfdec_bits_get_string (bits);
- if (object == NULL) {
- SWFDEC_ERROR ("cannot export id %u as %s, id wasn't found", id, name);
- g_free (name);
- } else if (name == NULL) {
- SWFDEC_ERROR ("cannot export id %u, no name was given", id);
- } else {
- SwfdecRootExportData *data = g_new (SwfdecRootExportData, 1);
- data-...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...SwfdecBits *bits = bitsp;
+ const guint8 *ptr;
+
+ ptr = bits->ptr;
+ if (swfdec_bits_skip_bytes (bits, length) != length)
+ return CAIRO_STATUS_READ_ERROR;
+
+ memcpy (data, ptr, length);
+ return CAIRO_STATUS_SUCCESS;
+}
+
static void
swfdec_image_png_load (SwfdecImage *image)
{
- SWFDEC_ERROR ("implement loading PNG images");
+ SwfdecBits bits;
+
+ swfdec_bits_init (&bits, image->raw_data);
+ image->surface = cairo_image_surface_create_from_png_stream (
+ swfdec_image_png_read, &bits);
}
cairo_surface_t *
commit c13bbaaf453acdab1f5189990fe2ff91ed887bc...
2007 Mar 21
0
5 commits - README libswfdec/jpeg libswfdec/swfdec_image.c
..._jpeg_load (SwfdecImage *ima
dec = jpeg_decoder_new ();
- jpeg_decoder_addbits (dec, image->jpegtables->data,
- image->jpegtables->length);
+ if (image->jpegtables) {
+ if (image->jpegtables->data[0] != 0xff || image->jpegtables->data[1] != 0xd8) {
+ SWFDEC_ERROR("not jpeg %02x %02x",
+ image->jpegtables->data[0], image->jpegtables->data[1]);
+ jpeg_decoder_free (dec);
+ return;
+ }
+ jpeg_decoder_addbits (dec, image->jpegtables->data,
+ image->jpegtables->length);
+ }
+ if (image->raw_d...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...a
jpeg_decoder_addbits (dec, image->jpegtables->data,
image->jpegtables->length);
}
- if (image->raw_data->data[2] != 0xff || image->raw_data->data[3] != 0xd8) {
+ if (image->raw_data->data[0] != 0xff || image->raw_data->data[1] != 0xd8) {
SWFDEC_ERROR("not jpeg %02x %02x",
- image->raw_data->data[2], image->raw_data->data[3]);
+ image->raw_data->data[0], image->raw_data->data[1]);
jpeg_decoder_free (dec);
return;
}
- jpeg_decoder_addbits (dec, image->raw_data->data + 2,
- i...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...a
jpeg_decoder_addbits (dec, image->jpegtables->data,
image->jpegtables->length);
}
- if (image->raw_data->data[2] != 0xff || image->raw_data->data[3] != 0xd8) {
+ if (image->raw_data->data[0] != 0xff || image->raw_data->data[1] != 0xd8) {
SWFDEC_ERROR("not jpeg %02x %02x",
- image->raw_data->data[2], image->raw_data->data[3]);
+ image->raw_data->data[0], image->raw_data->data[1]);
jpeg_decoder_free (dec);
return;
}
- jpeg_decoder_addbits (dec, image->raw_data->data + 2,
- i...