summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/swf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/swf.c b/libavformat/swf.c
index 4f62240fac..1916d4a74c 100644
--- a/libavformat/swf.c
+++ b/libavformat/swf.c
@@ -734,8 +734,10 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
get_le16(pb); /* BITMAP_ID */
av_new_packet(pkt, len-2);
get_buffer(pb, pkt->data, 4);
- if (AV_RB32(pkt->data) == 0xffd8ffd9) {
+ if (AV_RB32(pkt->data) == 0xffd8ffd9 ||
+ AV_RB32(pkt->data) == 0xffd9ffd8) {
/* old SWF files containing SOI/EOI as data start */
+ /* files created by swink have reversed tag */
pkt->size -= 4;
get_buffer(pb, pkt->data, pkt->size);
} else {