Thanks, I queued a fixed version, some comments below.

On Fri, Mar 30, 2012 at 09:03:02PM +0530, Aneesh Dogra wrote:
> 
> --- a/libavcodec/pcm.c
> +++ b/libavcodec/pcm.c
> @@ -64,19 +64,19 @@ static av_cold int pcm_encode_close(AVCodecContext *avctx)
>  
> -#define ENCODE(type, endian, src, dst, n, shift, offset) \
> -    samples_##type = (const type*) src; \
> -    for(;n>0;n--) { \
> +#define ENCODE(type, endian, src, dst, n, shift, offset)               \
> +    samples_ ## type = (const type*) src;                              \
> +    for(; n > 0; n--) {                                                \

for (

> @@ -328,7 +328,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void 
> *data,
>          DECODE(32, be24, src, samples, n, 8, 0x800000)
>          break;
>      case CODEC_ID_PCM_S24DAUD:
> -        for(;n>0;n--) {
> +        for (; n > 0; n--) {
>            uint32_t v = bytestream_get_be24(&src);
>            v >>= 4; // sync flags are here
>            AV_WN16A(samples, av_reverse[(v >> 8) & 0xff] +

4 spaces indentation

> @@ -473,34 +479,36 @@ static int pcm_decode_frame(AVCodecContext *avctx, void 
> *data,
>  }
>  
>  #if CONFIG_ENCODERS
> -#define PCM_ENCODER(id_,sample_fmt_,name_,long_name_) \
> +#define PCM_ENCODER(id_,sample_fmt_,name_,long_name_)                    \

space after comma

> +AVCodec ff_ ## name_ ## _encoder = {                                     \
> +    .name         = #name_,                                              \
> +    .type         = AVMEDIA_TYPE_AUDIO,                                  \
> +    .id           = id_,                                                 \
> +    .init         = pcm_encode_init,                                     \
> +    .encode2      = pcm_encode_frame,                                    \
> +    .close        = pcm_encode_close,                                    \
> +    .capabilities = CODEC_CAP_VARIABLE_FRAME_SIZE,                       \
> +    .sample_fmts  = (const enum AVSampleFormat[]){ sample_fmt_,          \
> +                                                   AV_SAMPLE_FMT_NONE }, \
> +    .long_name = NULL_IF_CONFIG_SMALL(long_name_),                       \

Not all = are aligned here.

> -#define PCM_DECODER(id_,sample_fmt_,name_,long_name_)         \
> -AVCodec ff_ ## name_ ## _decoder = {            \
> -    .name           = #name_,                   \
> -    .type           = AVMEDIA_TYPE_AUDIO,       \
> -    .id             = id_,                      \
> -    .priv_data_size = sizeof(PCMDecode),        \
> -    .init           = pcm_decode_init,          \
> -    .decode         = pcm_decode_frame,         \
> -    .capabilities   = CODEC_CAP_DR1,            \
> -    .sample_fmts = (const enum 
> AVSampleFormat[]){sample_fmt_,AV_SAMPLE_FMT_NONE}, \
> -    .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
> +#define PCM_DECODER(id_,sample_fmt_,name_,long_name_)                   \
> +AVCodec ff_ ## name_ ## _decoder = {                                    \
> +    .name           = #name_,                                           \
> +    .type           = AVMEDIA_TYPE_AUDIO,                               \
> +    .id             = id_,                                              \
> +    .priv_data_size = sizeof(PCMDecode),                                \
> +    .init           = pcm_decode_init,                                  \
> +    .decode         = pcm_decode_frame,                                 \
> +    .capabilities   = CODEC_CAP_DR1,                                    \
> +    .sample_fmts = (const enum AVSampleFormat[]){ sample_fmt_,          \
> +                                                  AV_SAMPLE_FMT_NONE }, \
> +    .long_name = NULL_IF_CONFIG_SMALL(long_name_),                      \

see above

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to