]> git.sesse.net Git - ffmpeg/commitdiff
ivfenc: Add VPX codec tags.
authorAlex Converse <alex.converse@gmail.com>
Fri, 9 Sep 2016 15:05:20 +0000 (08:05 -0700)
committerAlex Converse <alex.converse@gmail.com>
Sat, 10 Sep 2016 23:40:47 +0000 (16:40 -0700)
This fixes remuxing VPX from MP4 without manually overwriting the tag.

libavformat/ivfenc.c

index 5dbcd97611ca780d5366b72df0d0fd3907a28ad4..f3ae4dca66b9cf94b1cf672906f65e6b21a6bc6a 100644 (file)
@@ -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 },
 };