Commit a7a8320c authored by James Almer's avatar James Almer

avcodec/null_bsf: move the reference in the bsf internal buffer

There's no need to allocate a new packet for it.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 5941179e
......@@ -24,17 +24,9 @@
#include "avcodec.h"
#include "bsf.h"
static int null_filter(AVBSFContext *ctx, AVPacket *out)
static int null_filter(AVBSFContext *ctx, AVPacket *pkt)
{
AVPacket *in;
int ret;
ret = ff_bsf_get_packet(ctx, &in);
if (ret < 0)
return ret;
av_packet_move_ref(out, in);
av_packet_free(&in);
return 0;
return ff_bsf_get_packet_ref(ctx, pkt);
}
const AVBitStreamFilter ff_null_bsf = {
......
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