Mercurial > libavformat.hg
comparison avidec.c @ 5522:7698da6e1f0a libavformat
Support uncompressed ("Resolution 1:1") Avid AVI Codec, (partially) fixes issue 1474.
author | cehoyos |
---|---|
date | Tue, 12 Jan 2010 00:29:26 +0000 |
parents | 4211f91f69b1 |
children | d8bfadee68a0 |
comparison
equal
deleted
inserted
replaced
5521:ab2af3bc94f6 | 5522:7698da6e1f0a |
---|---|
516 #endif | 516 #endif |
517 st->codec->codec_type = CODEC_TYPE_VIDEO; | 517 st->codec->codec_type = CODEC_TYPE_VIDEO; |
518 st->codec->codec_tag = tag1; | 518 st->codec->codec_tag = tag1; |
519 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1); | 519 st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1); |
520 st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts. | 520 st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts. |
521 // Support "Resolution 1:1" for Avid AVI Codec | |
522 if(tag1 == MKTAG('A', 'V', 'R', 'n') && | |
523 st->codec->extradata_size >= 31 && | |
524 !memcmp(&st->codec->extradata[28], "1:1", 3)) | |
525 st->codec->codec_id = CODEC_ID_RAWVIDEO; | |
521 | 526 |
522 if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){ | 527 if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){ |
523 st->codec->extradata_size+= 9; | 528 st->codec->extradata_size+= 9; |
524 st->codec->extradata= av_realloc(st->codec->extradata, st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); | 529 st->codec->extradata= av_realloc(st->codec->extradata, st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); |
525 if(st->codec->extradata) | 530 if(st->codec->extradata) |