Displaying 10 results from an estimated 10 matches for "swf_parse_header2".
Did you mean:
swf_parse_header1
2007 Jun 13
0
Branch 'as' - libswfdec/swfdec_swf_decoder.c
...tte at gnome.org>
Date: Wed Jun 13 19:37:45 2007 +0200
when the rate is 0, set it to 1
diff --git a/libswfdec/swfdec_swf_decoder.c b/libswfdec/swfdec_swf_decoder.c
index 66c6e34..33fb719 100644
--- a/libswfdec/swfdec_swf_decoder.c
+++ b/libswfdec/swfdec_swf_decoder.c
@@ -239,6 +239,10 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
dec->height = MAX (0, ceil (rect.y1 / SWFDEC_TWIPS_SCALE_FACTOR));
swfdec_bits_syncbits (&s->b);
dec->rate = swfdec_bits_get_u16 (&s->b);
+ if (dec->rate == 0) {
+ SWFDEC_INFO ("rate is 0, setting to 1");
+ dec->rate = 1;
+...
2007 Jan 22
0
Branch 'interpreter' - 3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_swf_decoder.c test/Makefile.am test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_tag.c test/swfedit_tag.h test/swfedit_token.c test/swfedit_token.h
..._FAILED,
+ "Unable to uncompress file");
+ return ret;
+ } else {
+ SwfdecBuffer *ret = swfdec_bits_get_buffer (bits, -1);
+ if (ret == NULL)
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ "File too small");
+ return ret;
+ }
+}
+
+static void
+swf_parse_header2 (SwfeditFile *file, SwfdecBits *bits)
+{
+ SwfdecRect rect;
+
+ swfdec_bits_get_rect (bits, &rect);
+ swfdec_bits_syncbits (bits);
+ swfedit_token_add (SWFEDIT_TOKEN (file), "rate", SWFEDIT_TOKEN_UINT16,
+ GUINT_TO_POINTER (swfdec_bits_get_u16 (bits)));
+ swfedit_token_add...
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
...t;pekka.lampila at iki.fi>
Date: Fri Nov 2 16:27:19 2007 +0200
Rate 0 means 65536 not 1
diff --git a/libswfdec/swfdec_swf_decoder.c b/libswfdec/swfdec_swf_decoder.c
index 1e4e247..7269b68 100644
--- a/libswfdec/swfdec_swf_decoder.c
+++ b/libswfdec/swfdec_swf_decoder.c
@@ -230,8 +230,8 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
swfdec_bits_syncbits (&s->b);
dec->rate = swfdec_bits_get_u16 (&s->b);
if (dec->rate == 0) {
- SWFDEC_INFO ("rate is 0, setting to 1");
- dec->rate = 1;
+ SWFDEC_INFO ("rate is 0, setting to 65536");
+ dec->ra...
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
...; /* player cache */
gboolean bgcolor_set; /* TRUE if the background color has been set */
diff --git a/libswfdec/swfdec_swf_decoder.c b/libswfdec/swfdec_swf_decoder.c
index 97f6965..f8a34b1 100644
--- a/libswfdec/swfdec_swf_decoder.c
+++ b/libswfdec/swfdec_swf_decoder.c
@@ -194,9 +194,11 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
swfdec_bits_get_rect (&s->b, &rect);
if (rect.x0 != 0.0 || rect.y0 != 0.0)
- SWFDEC_ERROR ("SWF window doesn't start at 0 0 but at %g %g\n", rect.x0, rect.y0);
- dec->width = ceil (rect.x1 / SWFDEC_TWIPS_SCALE_FACTOR);
- dec->height...
2007 Oct 18
0
18 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_flash_security.c
...ot;swfdec_script_internal.h"
#include "swfdec_sprite.h"
+#include "swfdec_tag.h"
enum {
SWFDEC_STATE_INIT1 = 0,
SWFDEC_STATE_INIT2,
- SWFDEC_STATE_PARSETAG,
+ SWFDEC_STATE_PARSE_FIRST_TAG,
+ SWFDEC_STATE_PARSE_TAG,
SWFDEC_STATE_EOF,
};
@@ -270,7 +272,7 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
swfdec_swf_decoder_flush_bits (s, &s->b);
- s->state = SWFDEC_STATE_PARSETAG;
+ s->state = SWFDEC_STATE_PARSE_FIRST_TAG;
return SWFDEC_STATUS_INIT;
}
@@ -292,7 +294,8 @@ swfdec_swf_decoder_parse (SwfdecDecoder *dec)
return SWFDEC_STATUS_ERROR;...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...- "Unable to uncompress file");
- return ret;
- } else {
- SwfdecBuffer *ret = swfdec_bits_get_buffer (bits, bytes_total);
- if (ret == NULL)
- g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
- "File too small");
- return ret;
- }
-}
-
-static void
-swf_parse_header2 (SwfeditFile *file, SwfdecBits *bits)
-{
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, "rect", SWFEDIT_TOKEN_RECT, NULL);
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, "rate", SWFEDIT_TOKEN_UINT16, NULL);
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, &...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...le (column, TRUE);
gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
diff --git a/test/swfedit_file.c b/test/swfedit_file.c
index dd5e035..165cde7 100644
--- a/test/swfedit_file.c
+++ b/test/swfedit_file.c
@@ -125,9 +125,9 @@ swf_parse_header1 (SwfeditFile *file, Sw
static void
swf_parse_header2 (SwfeditFile *file, SwfdecBits *bits)
{
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, "rect", SWFEDIT_TOKEN_RECT);
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, "rate", SWFEDIT_TOKEN_UINT16);
- swfedit_tag_read_token (SWFEDIT_TOKEN (file), bits, "frames&...
2007 Nov 07
0
36 commits - doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h
...}
- memcpy (s->buffer->data, buffer->data, 8);
SWFDEC_DECODER (s)->bytes_loaded = 8;
s->bytes_parsed = 8;
- swfdec_buffer_unref (buffer);
-
s->state = SWFDEC_STATE_INIT2;
+ swfdec_swf_decoder_deflate (s, rest);
return SWFDEC_STATUS_OK;
}
@@ -246,21 +277,17 @@ swf_parse_header2 (SwfdecSwfDecoder * s)
}
static SwfdecStatus
-swfdec_swf_decoder_parse (SwfdecDecoder *dec)
+swfdec_swf_decoder_parse_one (SwfdecSwfDecoder *s)
{
- SwfdecSwfDecoder *s = SWFDEC_SWF_DECODER (dec);
int ret = SWFDEC_STATUS_OK;
s->b = s->parse;
- g_assert (dec->player);
swi...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...= swfdec_bits_get_buffer (bits, -1);
+ SwfdecBuffer *ret = swfdec_bits_get_buffer (bits, bytes_total);
if (ret == NULL)
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
"File too small");
@@ -124,14 +125,9 @@ swf_parse_header1 (SwfeditFile *file, Sw
static void
swf_parse_header2 (SwfeditFile *file, SwfdecBits *bits)
{
- SwfdecRect rect;
-
- swfdec_bits_get_rect (bits, &rect);
- swfdec_bits_syncbits (bits);
- swfedit_token_add (SWFEDIT_TOKEN (file), "rate", SWFEDIT_TOKEN_UINT16,
- GUINT_TO_POINTER (swfdec_bits_get_u16 (bits)));
- swfedit_token_add...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...= swfdec_bits_get_buffer (bits, -1);
+ SwfdecBuffer *ret = swfdec_bits_get_buffer (bits, bytes_total);
if (ret == NULL)
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
"File too small");
@@ -124,14 +125,9 @@ swf_parse_header1 (SwfeditFile *file, Sw
static void
swf_parse_header2 (SwfeditFile *file, SwfdecBits *bits)
{
- SwfdecRect rect;
-
- swfdec_bits_get_rect (bits, &rect);
- swfdec_bits_syncbits (bits);
- swfedit_token_add (SWFEDIT_TOKEN (file), "rate", SWFEDIT_TOKEN_UINT16,
- GUINT_TO_POINTER (swfdec_bits_get_u16 (bits)));
- swfedit_token_add...