Mercurial > libavformat.hg
comparison matroskaenc.c @ 2923:0fde8da65761 libavformat
Use the isom avcc formatting for h264 extradata in matroska.
author | aurel |
---|---|
date | Fri, 11 Jan 2008 01:32:45 +0000 |
parents | d52c718e83f9 |
children | a6730b458d6c |
comparison
equal
deleted
inserted
replaced
2922:dcd599833abc | 2923:0fde8da65761 |
---|---|
22 #include "avformat.h" | 22 #include "avformat.h" |
23 #include "md5.h" | 23 #include "md5.h" |
24 #include "riff.h" | 24 #include "riff.h" |
25 #include "xiph.h" | 25 #include "xiph.h" |
26 #include "matroska.h" | 26 #include "matroska.h" |
27 #include "avc.h" | |
27 | 28 |
28 typedef struct ebml_master { | 29 typedef struct ebml_master { |
29 offset_t pos; ///< absolute offset in the file where the master's elements start | 30 offset_t pos; ///< absolute offset in the file where the master's elements start |
30 int sizebytes; ///< how many bytes were reserved for the size | 31 int sizebytes; ///< how many bytes were reserved for the size |
31 } ebml_master; | 32 } ebml_master; |
477 if (native_id) { | 478 if (native_id) { |
478 if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA) | 479 if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA) |
479 ret = put_xiph_codecpriv(s, dyn_cp, codec); | 480 ret = put_xiph_codecpriv(s, dyn_cp, codec); |
480 else if (codec->codec_id == CODEC_ID_FLAC) | 481 else if (codec->codec_id == CODEC_ID_FLAC) |
481 ret = put_flac_codecpriv(s, dyn_cp, codec); | 482 ret = put_flac_codecpriv(s, dyn_cp, codec); |
483 else if (codec->codec_id == CODEC_ID_H264) | |
484 ret = isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size); | |
482 else if (codec->extradata_size) | 485 else if (codec->extradata_size) |
483 put_buffer(dyn_cp, codec->extradata, codec->extradata_size); | 486 put_buffer(dyn_cp, codec->extradata, codec->extradata_size); |
484 } else if (codec->codec_type == CODEC_TYPE_VIDEO) { | 487 } else if (codec->codec_type == CODEC_TYPE_VIDEO) { |
485 if (!codec->codec_tag) | 488 if (!codec->codec_tag) |
486 codec->codec_tag = codec_get_tag(codec_bmp_tags, codec->codec_id); | 489 codec->codec_tag = codec_get_tag(codec_bmp_tags, codec->codec_id); |