Mercurial > libavformat.hg
changeset 5971:43548500ffbc libavformat
Reindent / reformat some code with broken indenting.
Patch by Sebastian Vater <cdgs DOT basty googlemail com>.
author | rbultje |
---|---|
date | Tue, 20 Apr 2010 18:40:45 +0000 |
parents | 8bb6b2e62a62 |
children | 41a3f142ca68 |
files | iff.c |
diffstat | 1 files changed, 29 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/iff.c Tue Apr 20 17:05:02 2010 +0000 +++ b/iff.c Tue Apr 20 18:40:45 2010 +0000 @@ -60,8 +60,16 @@ #define PACKET_SIZE 1024 -typedef enum {COMP_NONE, COMP_FIB, COMP_EXP} svx8_compression_type; -typedef enum {BITMAP_RAW, BITMAP_BYTERUN1} bitmap_compression_type; +typedef enum { + COMP_NONE, + COMP_FIB, + COMP_EXP +} svx8_compression_type; + +typedef enum { + BITMAP_RAW, + BITMAP_BYTERUN1 +} bitmap_compression_type; typedef struct { uint32_t body_size; @@ -176,27 +184,27 @@ switch(st->codec->codec_type) { case AVMEDIA_TYPE_AUDIO: - av_set_pts_info(st, 32, 1, st->codec->sample_rate); + av_set_pts_info(st, 32, 1, st->codec->sample_rate); - switch(compression) { - case COMP_NONE: - st->codec->codec_id = CODEC_ID_PCM_S8; - break; - case COMP_FIB: - st->codec->codec_id = CODEC_ID_8SVX_FIB; + switch(compression) { + case COMP_NONE: + st->codec->codec_id = CODEC_ID_PCM_S8; + break; + case COMP_FIB: + st->codec->codec_id = CODEC_ID_8SVX_FIB; + break; + case COMP_EXP: + st->codec->codec_id = CODEC_ID_8SVX_EXP; + break; + default: + av_log(s, AV_LOG_ERROR, "iff: unknown compression method\n"); + return -1; + } + + st->codec->bits_per_coded_sample = 8; + st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample; + st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; break; - case COMP_EXP: - st->codec->codec_id = CODEC_ID_8SVX_EXP; - break; - default: - av_log(s, AV_LOG_ERROR, "iff: unknown compression method\n"); - return -1; - } - - st->codec->bits_per_coded_sample = 8; - st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * st->codec->bits_per_coded_sample; - st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample; - break; case AVMEDIA_TYPE_VIDEO: switch (compression) {