On Sun, Jun 17, 2012 at 06:14:06PM +0300, Martin Storsjö wrote:
> 
> --- a/libavformat/amr.c
> +++ b/libavformat/amr.c
> @@ -28,27 +28,22 @@ Only mono files are supported.
>  
> -static const char AMR_header [] = "#!AMR\n";
> -static const char AMRWB_header [] = "#!AMR-WB\n";
> +static const char AMR_header[] = "#!AMR\n";
> +static const char AMRWB_header[] = "#!AMR-WB\n";

align the =

> +    } else if(enc->codec_id == CODEC_ID_AMR_WB) {

if (

> @@ -69,7 +64,7 @@ static int amr_probe(AVProbeData *p)
>      //This will also trigger multichannel files: "#!AMR_MC1.0\n" and
>      //"#!AMR-WB_MC1.0\n" (not supported)

space after //, more below

> @@ -85,29 +80,24 @@ static int amr_read_header(AVFormatContext *s)
>  
>      st = avformat_new_stream(s, NULL);
> -    if (!st)
> -    {
> +    if (!st) {
>          return AVERROR(ENOMEM);
>      }

drop {}

> @@ -115,40 +105,33 @@ static int amr_read_header(AVFormatContext *s)
>  
>  static int amr_read_packet(AVFormatContext *s,
> -                          AVPacket *pkt)
> +                           AVPacket *pkt)

join the lines instead

> +    if (s->pb->eof_reached) {
>          return AVERROR(EIO);
>      }

drop {}

> -        static const uint8_t packed_size[16] = {12, 13, 15, 17, 19, 20, 26, 
> 31, 5, 0, 0, 0, 0, 0, 0, 0};
> +        static const uint8_t packed_size[16] = { 12, 13, 15, 17, 19, 20, 26, 
> 31, 5, 0, 0, 0, 0, 0, 0, 0 };

Break this long line.

> -        static uint8_t packed_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 
> 61, 6, 6, 0, 0, 0, 1, 1};
> +        static uint8_t packed_size[16] = { 18, 24, 33, 37, 41, 47, 51, 59, 
> 61, 6, 6, 0, 0, 0, 1, 1 };

ditto

> -    if ( (size==0) || av_new_packet(pkt, size))
> -    {
> +    if (!size || av_new_packet(pkt, size)) {
>          return AVERROR(EIO);
>      }

drop {}

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

Reply via email to