aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/bsf.c
diff options
context:
space:
mode:
authorJan Sebechlebsky2016-07-26 12:40:08 +0200
committerMichael Niedermayer2016-08-13 10:59:50 +0200
commitbfdca87ab55c7f69087d962dc47aa45c8c6436fb (patch)
tree39015080d06d87a7000c41d4764a6e7bcc493248 /libavcodec/bsf.c
parent7d5501be1e429f77aca26327fbc1ec623e6e21af (diff)
avcodec/bsf: Forbid packet without payload in av_bsf_send_packet
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/bsf.c')
-rw-r--r--libavcodec/bsf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c
index 9b9ada796c..8e36861f14 100644
--- a/libavcodec/bsf.c
+++ b/libavcodec/bsf.c
@@ -21,6 +21,7 @@
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
+#include "libavutil/avassert.h"
#include "avcodec.h"
#include "bsf.h"
@@ -177,6 +178,8 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
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);