Commit 3ff5952d authored by alex's avatar alex

tell the user if compressed swf found


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4419 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent eaba84ad
...@@ -713,6 +713,7 @@ static int get_swf_tag(ByteIOContext *pb, int *len_ptr) ...@@ -713,6 +713,7 @@ static int get_swf_tag(ByteIOContext *pb, int *len_ptr)
if (len == 0x3f) { if (len == 0x3f) {
len = get_le32(pb); len = get_le32(pb);
} }
// av_log(NULL, AV_LOG_DEBUG, "Tag: %d - Len: %d\n", tag, len);
*len_ptr = len; *len_ptr = len;
return tag; return tag;
} }
...@@ -723,7 +724,7 @@ static int swf_probe(AVProbeData *p) ...@@ -723,7 +724,7 @@ static int swf_probe(AVProbeData *p)
/* check file header */ /* check file header */
if (p->buf_size <= 16) if (p->buf_size <= 16)
return 0; 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') p->buf[2] == 'S')
return AVPROBE_SCORE_MAX; return AVPROBE_SCORE_MAX;
else else
...@@ -744,7 +745,14 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap) ...@@ -744,7 +745,14 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1; return -1;
s->priv_data = swf; 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; return AVERROR_IO;
get_le32(pb); get_le32(pb);
/* skip rectangle size */ /* skip rectangle size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment