Mercurial > libavformat.hg
diff txd.c @ 2771:d52c718e83f9 libavformat
Use dynamically allocated ByteIOContext in AVFormatContext
patch by: Bj«Órn Axelsson, bjorn d axelsson a intinor d se
thread: [PATCH] Remove static ByteIOContexts, 06 nov 2007
author | andoma |
---|---|
date | Wed, 21 Nov 2007 07:41:00 +0000 |
parents | b21c2af60bc9 |
children | 7a0230981402 |
line wrap: on
line diff
--- a/txd.c Mon Nov 19 20:28:11 2007 +0000 +++ b/txd.c Wed Nov 21 07:41:00 2007 +0000 @@ -51,7 +51,7 @@ } static int txd_read_packet(AVFormatContext *s, AVPacket *pkt) { - ByteIOContext *pb = &s->pb; + ByteIOContext *pb = s->pb; unsigned int id, chunk_size, marker; int ret; @@ -60,7 +60,7 @@ chunk_size = get_le32(pb); marker = get_le32(pb); - if (url_feof(&s->pb)) + if (url_feof(s->pb)) return AVERROR(EIO); if (marker != TXD_MARKER && marker != TXD_MARKER2) { av_log(NULL, AV_LOG_ERROR, "marker does not match\n"); @@ -72,7 +72,7 @@ if (chunk_size > 100) break; case TXD_EXTRA: - url_fskip(&s->pb, chunk_size); + url_fskip(s->pb, chunk_size); case TXD_FILE: case TXD_TEXTURE: goto next_chunk; @@ -81,7 +81,7 @@ return AVERROR(EIO); } - ret = av_get_packet(&s->pb, pkt, chunk_size); + ret = av_get_packet(s->pb, pkt, chunk_size); pkt->stream_index = 0; return ret <= 0 ? AVERROR(EIO) : ret;