aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAlexandra Khirnova <alexandra.khirnova@gmail.com>2013-11-21 22:06:31 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-23 12:08:53 +0100
commit6f270da61b8c9a2dc71f48ae2a21e046d7f15b69 (patch)
tree03e8a2903f1a09b7a431f400e6d60ae3943ea23e /libavcodec
parent7671dd7cd7d51bbd637cc46d8f104a141bc355ea (diff)
downloadffmpeg-6f270da61b8c9a2dc71f48ae2a21e046d7f15b69.tar.gz
libschroedingerenc: do not assert on values from external libraries
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libschroedingerenc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 11cc0ebd31..d53d846a43 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -27,9 +27,6 @@
* (http://dirac.sourceforge.net/specification.html).
*/
-#undef NDEBUG
-#include <assert.h>
-
#include <schroedinger/schro.h>
#include <schroedinger/schrodebug.h>
#include <schroedinger/schrovideoformat.h>
@@ -301,8 +298,8 @@ static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
case SCHRO_STATE_HAVE_BUFFER:
case SCHRO_STATE_END_OF_STREAM:
enc_buf = schro_encoder_pull(encoder, &presentation_frame);
- assert(enc_buf->length > 0);
- assert(enc_buf->length <= buf_size);
+ if (enc_buf->length <= 0)
+ return AVERROR_BUG;
parse_code = enc_buf->data[4];
/* All non-frame data is prepended to actual frame data to