diff options
author | avcoder <ffmpeg@gmail.com> | 2009-03-17 12:27:32 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2009-03-17 12:27:32 +0000 |
commit | 6d050dd673b4cda3876698208571fbfb644dde61 (patch) | |
tree | de59eba46aa473dbb2879cd21beec2265ff1524a /libavformat/asfdec.c | |
parent | 852ca0e57d8d1ddd1841a4d9ad3ace79418ac54d (diff) | |
download | ffmpeg-6d050dd673b4cda3876698208571fbfb644dde61.tar.gz |
cosmetics: fix indentation, patch by avcoder, ffmpeg gmail com
Originally committed as revision 18022 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index 4d61739719..a609e84892 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -348,20 +348,20 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) get_buffer(pb, st->codec->extradata, st->codec->extradata_size); } - /* Extract palette from extradata if bpp <= 8 */ - /* This code assumes that extradata contains only palette */ - /* This is true for all paletted codecs implemented in ffmpeg */ - if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { - st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); + /* Extract palette from extradata if bpp <= 8 */ + /* This code assumes that extradata contains only palette */ + /* This is true for all paletted codecs implemented in ffmpeg */ + if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { + st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); #ifdef WORDS_BIGENDIAN - for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++) - st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]); + for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++) + st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]); #else - memcpy(st->codec->palctrl->palette, st->codec->extradata, - FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)); + memcpy(st->codec->palctrl->palette, st->codec->extradata, + FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)); #endif - st->codec->palctrl->palette_changed = 1; - } + st->codec->palctrl->palette_changed = 1; + } st->codec->codec_tag = tag1; st->codec->codec_id = codec_get_id(codec_bmp_tags, tag1); @@ -398,21 +398,20 @@ static int asf_read_header(AVFormatContext *s, AVFormatParameters *ap) // av_log(s, AV_LOG_ERROR, "flags: 0x%x stream id %d, bitrate %d\n", flags, stream_id, bitrate); asf->stream_bitrates[stream_id]= bitrate; } - } else if (!memcmp(&g, &ff_asf_extended_content_header, sizeof(GUID))) { - int desc_count, i; - - desc_count = get_le16(pb); - for(i=0;i<desc_count;i++) - { - int name_len,value_type,value_len; - char name[1024]; - - name_len = get_le16(pb); - get_str16_nolen(pb, name_len, name, sizeof(name)); - value_type = get_le16(pb); - value_len = get_le16(pb); - get_tag(s, name, value_type, value_len); - } + } else if (!memcmp(&g, &ff_asf_extended_content_header, sizeof(GUID))) { + int desc_count, i; + + desc_count = get_le16(pb); + for(i=0;i<desc_count;i++) { + int name_len,value_type,value_len; + char name[1024]; + + name_len = get_le16(pb); + get_str16_nolen(pb, name_len, name, sizeof(name)); + value_type = get_le16(pb); + value_len = get_le16(pb); + get_tag(s, name, value_type, value_len); + } } else if (!memcmp(&g, &ff_asf_metadata_header, sizeof(GUID))) { int n, stream_num, name_len, value_len, value_type, value_num; n = get_le16(pb); |