mirror of https://git.ffmpeg.org/ffmpeg.git
support swink created files which have soi/eoi broken tags reversed
Originally committed as revision 10152 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
45e3c163a9
commit
1f794d69c0
|
@ -734,8 +734,10 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||||
get_le16(pb); /* BITMAP_ID */
|
get_le16(pb); /* BITMAP_ID */
|
||||||
av_new_packet(pkt, len-2);
|
av_new_packet(pkt, len-2);
|
||||||
get_buffer(pb, pkt->data, 4);
|
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 */
|
/* old SWF files containing SOI/EOI as data start */
|
||||||
|
/* files created by swink have reversed tag */
|
||||||
pkt->size -= 4;
|
pkt->size -= 4;
|
||||||
get_buffer(pb, pkt->data, pkt->size);
|
get_buffer(pb, pkt->data, pkt->size);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue