]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libschroedingerenc.c
Merge commit '58a868968df445068a143f327ced03b6a02baf0d'
[ffmpeg] / libavcodec / libschroedingerenc.c
index f3455df1f38a38026780b0163c1d20dd64c1172b..777d7c5044d091007c2c885b738bc0552b2eecd2 100644 (file)
@@ -299,7 +299,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);
-            av_assert0(enc_buf->length > 0);
+            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