diff mbox

[FFmpeg-devel] ivfenc: Add VPX codec tags.

Message ID 1473433867-7323-1-git-send-email-alex.converse@gmail.com
State Accepted
Commit 09317e3e06d7126337c2311ecf8bb7762369c110
Headers show

Commit Message

Alex Converse Sept. 9, 2016, 3:11 p.m. UTC
This fixes remuxing VPX from MP4 without manually overwriting the tag.
---
 libavformat/ivfenc.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Carl Eugen Hoyos Sept. 9, 2016, 3:41 p.m. UTC | #1
2016-09-09 17:11 GMT+02:00 Alex Converse <alex.converse@gmail.com>:
> This fixes remuxing VPX from MP4 without manually overwriting the tag.

Please push anytime.

Carl Euigen
diff mbox

Patch

diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c
index 5dbcd97..f3ae4dc 100644
--- a/libavformat/ivfenc.c
+++ b/libavformat/ivfenc.c
@@ -97,6 +97,12 @@  static int ivf_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
     return ret;
 }
 
+static const AVCodecTag codec_ivf_tags[] = {
+    { AV_CODEC_ID_VP8,  MKTAG('V', 'P', '8', '0') },
+    { AV_CODEC_ID_VP9,  MKTAG('V', 'P', '9', '0') },
+    { AV_CODEC_ID_NONE, 0 }
+};
+
 AVOutputFormat ff_ivf_muxer = {
     .priv_data_size = sizeof(IVFEncContext),
     .name         = "ivf",
@@ -108,4 +114,5 @@  AVOutputFormat ff_ivf_muxer = {
     .write_packet = ivf_write_packet,
     .write_trailer = ivf_write_trailer,
     .check_bitstream = ivf_check_bitstream,
+    .codec_tag    = (const AVCodecTag* const []){ codec_ivf_tags, 0 },
 };