diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2016-02-29 17:43:07 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2016-03-11 19:19:14 +0300 |
commit | 2e6636aa87303d37b112e79f093ca39500f92364 (patch) | |
tree | 27e543b4779c1519781ad18824ea0d1f36491e59 /libavformat/ivfenc.c | |
parent | 6d8ab358a3c2a8fbdd6ae7f144893b7c88c30557 (diff) |
vp9: add superframe merging bitstream filter.
Fixes ticket 4313.
Diffstat (limited to 'libavformat/ivfenc.c')
-rw-r--r-- | libavformat/ivfenc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index 484d87d093..490b0a921a 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -18,6 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" +#include "internal.h" #include "libavutil/intreadwrite.h" typedef struct IVFEncContext { @@ -85,6 +86,17 @@ static int ivf_write_trailer(AVFormatContext *s) return 0; } +static int ivf_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) +{ + int ret = 1; + AVStream *st = s->streams[pkt->stream_index]; + + if (st->codec->codec_id == AV_CODEC_ID_VP9) + ret = ff_stream_add_bitstream_filter(st, "vp9_superframe", NULL); + + return ret; +} + AVOutputFormat ff_ivf_muxer = { .priv_data_size = sizeof(IVFEncContext), .name = "ivf", @@ -95,4 +107,5 @@ AVOutputFormat ff_ivf_muxer = { .write_header = ivf_write_header, .write_packet = ivf_write_packet, .write_trailer = ivf_write_trailer, + .check_bitstream = ivf_check_bitstream, }; |