Commit 844a115c authored by James Almer's avatar James Almer

Revert "avcodec/bsf: Forbid packet without payload in av_bsf_send_packet"

This reverts commit bfdca87a.

Packets with no data or side data will be valid EOF signal in an
upcoming merge.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 31483870
...@@ -6039,8 +6039,7 @@ int av_bsf_init(AVBSFContext *ctx); ...@@ -6039,8 +6039,7 @@ int av_bsf_init(AVBSFContext *ctx);
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or * av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
* AVERROR_EOF. * AVERROR_EOF.
* *
* @param pkt the packet to filter. pkt must contain some payload (i.e data or * @param pkt the packet to filter. The bitstream filter will take ownership of
* side data must be present in pkt). The bitstream filter will take ownership of
* the packet and reset the contents of pkt. pkt is not touched if an error occurs. * the packet and reset the contents of pkt. pkt is not touched if an error occurs.
* This parameter may be NULL, which signals the end of the stream (i.e. no more * This parameter may be NULL, which signals the end of the stream (i.e. no more
* packets will be sent). That will cause the filter to output any packets it * packets will be sent). That will cause the filter to output any packets it
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "libavutil/log.h" #include "libavutil/log.h"
#include "libavutil/mem.h" #include "libavutil/mem.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include "libavutil/bprint.h" #include "libavutil/bprint.h"
...@@ -180,8 +179,6 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt) ...@@ -180,8 +179,6 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
return 0; return 0;
} }
av_assert0(pkt->data || pkt->side_data);
if (ctx->internal->eof) { if (ctx->internal->eof) {
av_log(ctx, AV_LOG_ERROR, "A non-NULL packet sent after an EOF.\n"); av_log(ctx, AV_LOG_ERROR, "A non-NULL packet sent after an EOF.\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment