[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] Cannon extract images using swfextract
From: |
Markus Stumpf |
Subject: |
Re: [Swftools-common] Cannon extract images using swfextract |
Date: |
Wed, 14 Jan 2009 08:36:32 +0100 |
User-agent: |
Mutt/1.4.2.3i |
Hi,
please disregard my last post :-(
Sometimes reading the nice and informational comments would really help
to understand the code :-(
Ok, next try:
There was no code to handle the case that the id was an ST_DEFINEBITSJPEG3
but there is only one stream instead of two.
This should fix it
*** swfextract.c 2008-09-06 11:10:25.000000000 +0200
--- swfextract.c.new 2009-01-14 08:29:51.000000000 +0100
***************
*** 675,682 ****
else if(tag->id == ST_DEFINEBITSJPEG3 && tag->len>6) {
U32 end = GET32(&tag->data[2])+6;
int pos = findjpegboundary(&tag->data[6], tag->len-6);
! if(pos<0)
return;
pos+=6;
fi = save_fopen(filename, "wb");
fwrite(&tag->data[6], pos-6, 1, fi);
--- 675,686 ----
else if(tag->id == ST_DEFINEBITSJPEG3 && tag->len>6) {
U32 end = GET32(&tag->data[2])+6;
int pos = findjpegboundary(&tag->data[6], tag->len-6);
! if(pos<0) {
! fi = save_fopen(filename, "wb");
! fwrite(&tag->data[6], end-6, 1, fi);
! fclose(fi);
return;
+ }
pos+=6;
fi = save_fopen(filename, "wb");
fwrite(&tag->data[6], pos-6, 1, fi);
Sorry,
\Maex
--
Markus Stumpf