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: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2018-03-16 19:51:08 -03:00
parent 5941179e28
commit a7a8320c4f
1 changed files with 2 additions and 10 deletions

View File

@ -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 = {