[FFmpeg-cvslog] avcodec/remove_extradata_bsf: Add back 'k' and 'e' options
Michael Niedermayer
git at videolan.org
Mon Apr 18 02:56:28 CEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Apr 18 02:31:55 2016 +0200| [57fc93ecb2ce592ccd17b81edf1a9f3fde5089ba] | committer: Michael Niedermayer
avcodec/remove_extradata_bsf: Add back 'k' and 'e' options
broken since af9cac1be1750ecc0e12c6788a3aeed1f1a778be
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57fc93ecb2ce592ccd17b81edf1a9f3fde5089ba
---
libavcodec/remove_extradata_bsf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/remove_extradata_bsf.c b/libavcodec/remove_extradata_bsf.c
index c183567..dd4cf17 100644
--- a/libavcodec/remove_extradata_bsf.c
+++ b/libavcodec/remove_extradata_bsf.c
@@ -27,6 +27,7 @@
enum RemoveFreq {
REMOVE_FREQ_KEYFRAME,
REMOVE_FREQ_ALL,
+ REMOVE_FREQ_NONKEYFRAME,
};
typedef struct RemoveExtradataContext {
@@ -50,6 +51,7 @@ static int remove_extradata(AVBSFContext *ctx, AVPacket *out)
if (s->parser && s->parser->parser->split) {
if (s->freq == REMOVE_FREQ_ALL ||
+ (s->freq == REMOVE_FREQ_NONKEYFRAME && !(in->flags & AV_PKT_FLAG_KEY)) ||
(s->freq == REMOVE_FREQ_KEYFRAME && in->flags & AV_PKT_FLAG_KEY)) {
int i = s->parser->parser->split(s->avctx, in->data, in->size);
in->data += i;
@@ -94,7 +96,9 @@ static void remove_extradata_close(AVBSFContext *ctx)
#define OFFSET(x) offsetof(RemoveExtradataContext, x)
static const AVOption options[] = {
{ "freq", NULL, OFFSET(freq), AV_OPT_TYPE_INT, { .i64 = REMOVE_FREQ_KEYFRAME }, REMOVE_FREQ_KEYFRAME, REMOVE_FREQ_ALL, 0, "freq" },
+ { "k", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_NONKEYFRAME }, .unit = "freq" },
{ "keyframe", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_KEYFRAME }, .unit = "freq" },
+ { "e", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_ALL }, .unit = "freq" },
{ "all", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_ALL }, .unit = "freq" },
{ NULL },
};
More information about the ffmpeg-cvslog
mailing list