git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f19ae9e
)
Do not allow 0 sample rate in TMV demuxer
author
Daniel Verkamp
<daniel@drv.nu>
Fri, 9 Oct 2009 18:29:19 +0000
(18:29 +0000)
committer
Daniel Verkamp
<daniel@drv.nu>
Fri, 9 Oct 2009 18:29:19 +0000
(18:29 +0000)
Originally committed as revision 20195 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/tmv.c
patch
|
blob
|
history
diff --git
a/libavformat/tmv.c
b/libavformat/tmv.c
index
4561a03
..
ab6a14f
100644
(file)
--- a/
libavformat/tmv.c
+++ b/
libavformat/tmv.c
@@
-77,6
+77,11
@@
static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
return AVERROR(ENOMEM);
ast->codec->sample_rate = get_le16(pb);
+ if (!ast->codec->sample_rate) {
+ av_log(s, AV_LOG_ERROR, "invalid sample rate\n");
+ return -1;
+ }
+
tmv->audio_chunk_size = get_le16(pb);
if (!tmv->audio_chunk_size) {
av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");