avcodec/(null|opus_metadata)_bsf: Use ff_bsf_get_packet_ref() directly

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/338/head
Andreas Rheinhardt 5 years ago
parent 47cd3c88c5
commit 6db97188d8
  1. 7
      libavcodec/null_bsf.c
  2. 7
      libavcodec/opus_metadata_bsf.c

@ -24,12 +24,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "bsf.h" #include "bsf.h"
static int null_filter(AVBSFContext *ctx, AVPacket *pkt)
{
return ff_bsf_get_packet_ref(ctx, pkt);
}
const AVBitStreamFilter ff_null_bsf = { const AVBitStreamFilter ff_null_bsf = {
.name = "null", .name = "null",
.filter = null_filter, .filter = ff_bsf_get_packet_ref,
}; };

@ -25,11 +25,6 @@ typedef struct OpusBSFContext {
int gain; int gain;
} OpusBSFContext; } OpusBSFContext;
static int opus_metadata_filter(AVBSFContext *bsfc, AVPacket *pkt)
{
return ff_bsf_get_packet_ref(bsfc, pkt);
}
static int opus_metadata_init(AVBSFContext *bsfc) static int opus_metadata_init(AVBSFContext *bsfc)
{ {
OpusBSFContext *s = bsfc->priv_data; OpusBSFContext *s = bsfc->priv_data;
@ -67,6 +62,6 @@ const AVBitStreamFilter ff_opus_metadata_bsf = {
.priv_data_size = sizeof(OpusBSFContext), .priv_data_size = sizeof(OpusBSFContext),
.priv_class = &opus_metadata_class, .priv_class = &opus_metadata_class,
.init = &opus_metadata_init, .init = &opus_metadata_init,
.filter = &opus_metadata_filter, .filter = &ff_bsf_get_packet_ref,
.codec_ids = codec_ids, .codec_ids = codec_ids,
}; };

Loading…
Cancel
Save