aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-16 06:02:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 18:28:54 +0100
commitcd5d5bf45c42d011efec5455162dfc6fb6e93afd (patch)
treea99759176c610adfaa8d88021b3d0bbb4972dbf9
parentaed8e8f9f3aed29699f845b2a67a5b94f8dd2614 (diff)
downloadffmpeg-cd5d5bf45c42d011efec5455162dfc6fb6e93afd.tar.gz
txddemux: Limit allocated packets to filesize.
Fixes Ticket772 Bug found by: Diana Elena Muscalu Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit f72601d06378494b5026b919fcd3eb5eb22799a1) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/txd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/txd.c b/libavformat/txd.c
index 5d9f969270..284d53212f 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -48,6 +48,9 @@ static int txd_read_header(AVFormatContext *s, AVFormatParameters *ap) {
st->codec->time_base.den = 5;
st->codec->time_base.num = 1;
/* the parameters will be extracted from the compressed bitstream */
+
+ s->pb->maxsize= avio_size(s->pb);
+
return 0;
}