summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavcodec/null_bsf.c
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-27 19:15:26 +0200
committerGitHub <noreply@github.com>2018-04-27 19:15:26 +0200
commitc75dae3ed21bfa5a8ae46cd83d18329af5bea05a (patch)
treeef657c38feb2368a3c86765778d1f068aa5eb614 /media/ffvpx/libavcodec/null_bsf.c
parentc82c6d960a7f19d6595171f9705c43514f20c1ec (diff)
parent6ada4b14e4cfc91f5f1b2556623cab691f3ab813 (diff)
downloadUXP-c75dae3ed21bfa5a8ae46cd83d18329af5bea05a.tar
UXP-c75dae3ed21bfa5a8ae46cd83d18329af5bea05a.tar.gz
UXP-c75dae3ed21bfa5a8ae46cd83d18329af5bea05a.tar.lz
UXP-c75dae3ed21bfa5a8ae46cd83d18329af5bea05a.tar.xz
UXP-c75dae3ed21bfa5a8ae46cd83d18329af5bea05a.zip
Merge pull request #275 from trav90/ffvpx-resync
Resync ffvpx code with 3.4.2-release from upstream
Diffstat (limited to 'media/ffvpx/libavcodec/null_bsf.c')
-rw-r--r--media/ffvpx/libavcodec/null_bsf.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/media/ffvpx/libavcodec/null_bsf.c b/media/ffvpx/libavcodec/null_bsf.c
new file mode 100644
index 000000000..feb71248a
--- /dev/null
+++ b/media/ffvpx/libavcodec/null_bsf.c
@@ -0,0 +1,43 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Null bitstream filter -- pass the input through unchanged.
+ */
+
+#include "avcodec.h"
+#include "bsf.h"
+
+static int null_filter(AVBSFContext *ctx, AVPacket *out)
+{
+ 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;
+}
+
+const AVBitStreamFilter ff_null_bsf = {
+ .name = "null",
+ .filter = null_filter,
+};