[FFmpeg-devel] avformat/mov: add VP8 codec support

Submitted by Steven Liu on Feb. 5, 2018, 5:52 a.m.

Details

Message ID 20180205055239.24840-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Steven Liu Feb. 5, 2018, 5:52 a.m.
fix ticket: 7000

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/isom.c | 1 +
 libavformat/mov.c  | 1 +
 2 files changed, 2 insertions(+)

Comments

Carl Eugen Hoyos Feb. 5, 2018, 11:52 a.m.
2018-02-05 6:52 GMT+01:00 Steven Liu <lq@chinaffmpeg.org>:
> fix ticket: 7000

I believe this patch would allow to create invalid mp4 files
containing vp8, so it cannot get committed.
See 54327c2b

Carl Eugen

Patch hide | download patch | download mbox

diff --git a/libavformat/isom.c b/libavformat/isom.c
index 9d9f85885b..95dceaa50b 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -187,6 +187,7 @@  const AVCodecTag ff_codec_movvideo_tags[] = {
     { AV_CODEC_ID_H264, MKTAG('a', 'v', 'l', 'g') }, /* Panasonic P2 AVC-LongG */
 
     { AV_CODEC_ID_VP9,  MKTAG('v', 'p', '0', '9') }, /* VP9 */
+    { AV_CODEC_ID_VP8,  MKTAG('v', 'p', '0', '8') }, /* VP8 */
 
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d16b431e03..767f196bb0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2398,6 +2398,7 @@  static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
     case AV_CODEC_ID_MPEG1VIDEO:
     case AV_CODEC_ID_VC1:
     case AV_CODEC_ID_VP9:
+    case AV_CODEC_ID_VP8:
         st->need_parsing = AVSTREAM_PARSE_FULL;
         break;
     default: