diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-08-03 15:33:48 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2006-08-03 15:33:48 +0000 |
commit | f8503792f00d21402f56e702ba636f36b8b0ba9b (patch) | |
tree | e0ae98b9de2f5b8309e5fc83f42a7d1b2185a044 | |
parent | 7c2a270b705b97d7ad3c0fc0acb7537066958a6f (diff) | |
download | ffmpeg-f8503792f00d21402f56e702ba636f36b8b0ba9b.tar.gz |
revert r5909, dont use non constant static variable, breaks multithreaded apps
Originally committed as revision 5917 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mxf.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c index 67649ae88e..33eed09019 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -167,8 +167,6 @@ typedef struct MXFMetadataReadTableEntry { static const uint8_t mxf_header_partition_pack_key[] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x02 }; static const uint8_t mxf_essence_element_key[] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01 }; -static offset_t mxf_header_offset = 0; - #define IS_KLV_KEY(x, y) (!memcmp(x, y, sizeof(y))) #define PRINT_KEY(x) dprintf("%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", \ @@ -886,11 +884,6 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap) KLVPacket klv; mxf->fc = s; - dprintf("header offset %llx\n", mxf_header_offset); - if (url_fseek(&s->pb, mxf_header_offset, SEEK_SET) < 0) { - av_log(s, AV_LOG_ERROR, "error seeking to header offset\n"); - return -1; - } while (!url_feof(&s->pb)) { const MXFMetadataReadTableEntry *function; @@ -961,10 +954,8 @@ static int mxf_probe(AVProbeData *p) { /* Must skip Run-In Sequence and search for MXF header partition pack key SMPTE 377M 5.5 */ end -= sizeof(mxf_header_partition_pack_key); for (; bufp < end; bufp++) { - if (IS_KLV_KEY(bufp, mxf_header_partition_pack_key)) { - mxf_header_offset = bufp - p->buf; + if (IS_KLV_KEY(bufp, mxf_header_partition_pack_key)) return AVPROBE_SCORE_MAX; - } } return 0; } |