# HG changeset patch # User alex # Date 1120341573 0 # Node ID e1007d19f28dbc470a98c1a7e58ebffe350f6d7a # Parent 6ace9fde011e94a887e27f994b7837f538cb3833 tell the user if compressed swf found diff -r 6ace9fde011e -r e1007d19f28d swf.c --- a/swf.c Thu Jun 30 11:42:17 2005 +0000 +++ b/swf.c Sat Jul 02 21:59:33 2005 +0000 @@ -713,6 +713,7 @@ if (len == 0x3f) { len = get_le32(pb); } +// av_log(NULL, AV_LOG_DEBUG, "Tag: %d - Len: %d\n", tag, len); *len_ptr = len; return tag; } @@ -723,7 +724,7 @@ /* check file header */ if (p->buf_size <= 16) return 0; - if (p->buf[0] == 'F' && p->buf[1] == 'W' && + if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' && p->buf[2] == 'S') return AVPROBE_SCORE_MAX; else @@ -744,7 +745,14 @@ return -1; s->priv_data = swf; - if ((get_be32(pb) & 0xffffff00) != MKBETAG('F', 'W', 'S', 0)) + tag = get_be32(pb) & 0xffffff00; + + if (tag == MKBETAG('C', 'W', 'S', 0)) + { + av_log(s, AV_LOG_ERROR, "Compressed SWF format not supported\n"); + return AVERROR_IO; + } + if (tag != MKBETAG('F', 'W', 'S', 0)) return AVERROR_IO; get_le32(pb); /* skip rectangle size */