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


Reply via email to