[FFmpeg-cvslog] txd/westwood: remove demuxer specific overallocate solutions as the new generic code

Michael Niedermayer git at videolan.org
Fri Dec 16 17:18:18 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 16 15:44:29 2011 +0100| [207d9eab5a47c54173a3a3cbe990aa746fe6e39a] | committer: Michael Niedermayer

txd/westwood: remove demuxer specific overallocate solutions as the new generic code
handles it fine.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=207d9eab5a47c54173a3a3cbe990aa746fe6e39a
---

 libavformat/txd.c      |    2 --
 libavformat/westwood.c |    6 ------
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/libavformat/txd.c b/libavformat/txd.c
index 284d532..06aca8c 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -49,8 +49,6 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
     st->codec->time_base.num = 1;
     /* the parameters will be extracted from the compressed bitstream */
 
-    s->pb->maxsize= avio_size(s->pb);
-
     return 0;
 }
 
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index b803b68..4cbd5be 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -320,15 +320,9 @@ static int wsvqa_read_packet(AVFormatContext *s,
     int skip_byte;
 
     while (avio_read(pb, preamble, VQA_PREAMBLE_SIZE) == VQA_PREAMBLE_SIZE) {
-        int64_t filesize= avio_size(s->pb);
         chunk_type = AV_RB32(&preamble[0]);
         chunk_size = AV_RB32(&preamble[4]);
 
-        if(filesize>=0 && chunk_size > filesize){
-            av_log(s, AV_LOG_ERROR, "Chunk with size %d truncated\n", chunk_size);
-            chunk_size= filesize;
-        }
-
         skip_byte = chunk_size & 0x01;
 
         if ((chunk_type == SND2_TAG || chunk_type == SND1_TAG) && wsvqa->audio_channels == 0) {



More information about the ffmpeg-cvslog mailing list