1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

View File

@ -24,17 +24,9 @@
#include "avcodec.h" #include "avcodec.h"
#include "bsf.h" #include "bsf.h"
static int null_filter(AVBSFContext *ctx, AVPacket *out) static int null_filter(AVBSFContext *ctx, AVPacket *pkt)
{ {
AVPacket *in; return ff_bsf_get_packet_ref(ctx, pkt);
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;
} }
const AVBitStreamFilter ff_null_bsf = { const AVBitStreamFilter ff_null_bsf = {