[FFmpeg-cvslog] cook: reverse a condition so that the code makes more sense
Justin Ruggles
git at videolan.org
Fri Nov 2 13:49:13 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Oct 21 14:33:11 2012 -0400| [d21b2e4726822ec1c604e2b9010a1a2cc0d88aec] | committer: Justin Ruggles
cook: reverse a condition so that the code makes more sense
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d21b2e4726822ec1c604e2b9010a1a2cc0d88aec
---
libavcodec/cook.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index f6d2e66..211fe12 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1244,9 +1244,8 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
}
/* Try to catch some obviously faulty streams, othervise it might be exploitable */
- if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512)
- || (q->samples_per_channel == 1024)) {
- } else {
+ if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&
+ q->samples_per_channel != 1024) {
av_log_ask_for_sample(avctx,
"unknown amount of samples_per_channel = %d\n",
q->samples_per_channel);
More information about the ffmpeg-cvslog
mailing list