#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
-#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
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);