Revision 169eb021

View differences:

libavformat/mov.c
116 116
    { CODEC_ID_SMC, MKTAG('s', 'm', 'c', ' ') }, /* Apple Graphics (SMC) */
117 117
    { CODEC_ID_QTRLE, MKTAG('r', 'l', 'e', ' ') }, /* Apple Animation (RLE) */
118 118
    { CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
119
    { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
119 120
    { CODEC_ID_NONE, 0 },
120 121
};
121 122

  
......
692 693
    return 0;
693 694
}
694 695

  
696
static int mov_read_avcC(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
697
{
698
    AVStream *st = c->fc->streams[c->fc->nb_streams-1];
699

  
700
    av_free(st->codec.extradata);
701

  
702
    st->codec.extradata_size = atom.size;
703
    st->codec.extradata = (uint8_t*) av_mallocz(st->codec.extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
704

  
705
    if (st->codec.extradata) {
706
	get_buffer(pb, st->codec.extradata, atom.size);
707
    } else
708
	url_fskip(pb, atom.size);
709

  
710
    return 0;
711
}
712

  
695 713
static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
696 714
{
697 715
    AVStream *st = c->fc->streams[c->fc->nb_streams-1];
......
1481 1499
{ MKTAG( 's', 'd', 'h', 'd' ), mov_read_default },
1482 1500
{ MKTAG( 's', 'k', 'i', 'p' ), mov_read_leaf },
1483 1501
{ MKTAG( 's', 'm', 'h', 'd' ), mov_read_leaf }, /* sound media info header */
1484
{ MKTAG( 'S', 'M', 'I', ' ' ), mov_read_smi }, /* Sorrenson extension ??? */
1502
{ MKTAG( 'S', 'M', 'I', ' ' ), mov_read_smi }, /* Sorenson extension ??? */
1503
{ MKTAG( 'a', 'v', 'c', 'C' ), mov_read_avcC }, 
1485 1504
{ MKTAG( 's', 't', 'b', 'l' ), mov_read_default },
1486 1505
{ MKTAG( 's', 't', 'c', 'o' ), mov_read_stco },
1487 1506
{ MKTAG( 's', 't', 'd', 'p' ), mov_read_default },

Also available in: Unified diff