]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bsf.c
lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.
[ffmpeg] / libavcodec / bsf.c
index c984526e140d6df5cd307d46784242691367459b..38b423101c36122b583d4690f4c4aeaf57523503 100644 (file)
@@ -21,7 +21,6 @@
 #include "libavutil/log.h"
 #include "libavutil/mem.h"
 #include "libavutil/opt.h"
-#include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
 #include "libavutil/bprint.h"
 
@@ -175,13 +174,11 @@ int av_bsf_init(AVBSFContext *ctx)
 
 int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
 {
-    if (!pkt) {
+    if (!pkt || (!pkt->data && !pkt->side_data_elems)) {
         ctx->internal->eof = 1;
         return 0;
     }
 
-    av_assert0(pkt->data || pkt->side_data);
-
     if (ctx->internal->eof) {
         av_log(ctx, AV_LOG_ERROR, "A non-NULL packet sent after an EOF.\n");
         return AVERROR(EINVAL);