Browse Source

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>
tags/n4.0
James Almer 8 years ago
parent
commit
a7a8320c4f
1 changed files with 2 additions and 10 deletions
  1. +2
    -10
      libavcodec/null_bsf.c

+ 2
- 10
libavcodec/null_bsf.c 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 = {


Loading…
Cancel
Save