On Fri, Oct 21, 2011 at 11:32:33PM +0200, Michael Karcher wrote:
> 
> --- a/Changelog
> +++ b/Changelog
> @@ -55,6 +55,7 @@ easier to use. The changes are:
>  - Speex encoding via libspeex
>  - 4:2:2 H.264 decoding support
> +- OpenMG Audio muxer

audio

> --- a/libavformat/oma.c
> +++ b/libavformat/oma.c
> @@ -65,6 +68,10 @@ static const AVCodecTag codec_oma_tags[] = {
>  
> +static const uint16_t srate_tab[6] = {320,441,480,882,960,0};
> +
> +#if CONFIG_OMA_DEMUXER

The table is only used in the muxer, so it should be below the
appropriate #ifdef.

> @@ -444,3 +450,88 @@ AVInputFormat ff_oma_demuxer = {
>  
> +#endif
> +
> +#if CONFIG_OMA_MUXER
> +
> +static av_cold int oma_write_header(AVFormatContext *s)
> +{
> +    int i;
> +    AVCodecContext *format;
> +    int srate_index;
> +    int isjointstereo;
> +
> +    format = s->streams[0]->codec;
> +    /* check for support of the format first */
> +
> +    for (srate_index = 0; ; srate_index++)
> +    {

Here and below move the { to the previous line.

> +        if(srate_tab[srate_index] == 0)

if (

more below

> +    ffio_wfourcc(s->pb, "EA3\0");
> +    avio_w8(s->pb, EA3_HEADER_SIZE >> 7);
> +    avio_w8(s->pb, EA3_HEADER_SIZE & 0x7F);
> +    avio_wl16(s->pb, 0xFFFF);                /* not encrypted */
> +    for (i = 0;i < 6;i++)
> +        avio_wl32(s->pb, 0);         /* Padding + DRM id */

Get rid of the tabs here and in other places.

> +    switch(format->codec_tag)
> +    {
> +        case OMA_CODECID_ATRAC3:

Indent case at the same level as the switch.


I wonder if you could not (easily) put the muxer in a separate file and
skip the ifdeffery.

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

Reply via email to