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:
parent
5941179e28
commit
a7a8320c4f
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user