On Fri, Dec 23, 2011 at 07:50:36PM +0530, Aneesh Dogra wrote:
> 
> --- a/avplay.c
> +++ b/avplay.c
> @@ -228,12 +228,12 @@ static int screen_width = 0;
>  static int screen_height = 0;
>  static int audio_disable;
>  static int video_disable;
> -static int wanted_stream[AVMEDIA_TYPE_NB]={
> -    [AVMEDIA_TYPE_AUDIO]=-1,
> -    [AVMEDIA_TYPE_VIDEO]=-1,
> -    [AVMEDIA_TYPE_SUBTITLE]=-1,
> +static int wanted_stream[AVMEDIA_TYPE_NB] = {
> +    [AVMEDIA_TYPE_AUDIO] = -1,
> +    [AVMEDIA_TYPE_VIDEO] = -1,
> +    [AVMEDIA_TYPE_SUBTITLE] = -1,

Align the '='.

> @@ -742,15 +742,15 @@ static void video_audio_display(VideoState *s)
>      int16_t time_diff;
>      int rdft_bits, nb_freq;
>  
> -    for(rdft_bits=1; (1<<rdft_bits)<2*s->height; rdft_bits++)
> +    for (rdft_bits = 1; (1 << rdft_bits) < 2 * s->height; rdft_bits++)
>          ;
> -    nb_freq= 1<<(rdft_bits-1);
> +    nb_freq = 1 << (rdft_bits-1);

space around -

> @@ -800,10 +800,10 @@ static void video_audio_display(VideoState *s)
>          h = s->height / nb_display_channels;
>          /* graph height / 2 */
>          h2 = (h * 9) / 20;
> -        for(ch = 0;ch < nb_display_channels; ch++) {
> +        for (ch = 0;ch < nb_display_channels; ch++) {

space after ;

> @@ -840,10 +840,10 @@ static void video_audio_display(VideoState *s)
>              FFTSample *data[2];
> -            for(ch = 0;ch < nb_display_channels; ch++) {
> +            for (ch = 0;ch < nb_display_channels; ch++) {

ditto

> @@ -853,7 +853,7 @@ static void video_audio_display(VideoState *s)
>                  av_rdft_calc(s->rdft, data[ch]);
>              }
>              //least efficient way to do this, we should of course directly 
> access it but its more than fast enough
> -            for(y=0; y<s->height; y++){
> +            for (y=0; y<s->height; y++) {

space around operators

> @@ -869,30 +869,30 @@ static void video_audio_display(VideoState *s)
>  
> -static int video_open(VideoState *is){
> +static int video_open(VideoState *is) {

{ on the next line after function declarations

> -    if(is_full_screen) flags |= SDL_FULLSCREEN;
> +    if (is_full_screen) flags |= SDL_FULLSCREEN;
>      else               flags |= SDL_RESIZABLE;

Break these lines.

> @@ -2061,8 +2062,8 @@ static int audio_decode_frame(VideoState *is, double 
> *pts_ptr)
>              if (is->reformat_ctx) {
>                  const void *ibuf[6]= { is->frame->data[0] };
>                  void *obuf[6];
> -                int istride[6]= {av_get_bytes_per_sample(dec->sample_fmt)};
> -                int ostride[6]= {2};
> +                int istride[6]= { av_get_bytes_per_sample(dec->sample_fmt) };
> +                int ostride[6]= { 2 };
>                  int len= data_size/istride[0];
>                  obuf[0] = av_realloc(is->audio_buf1, FFALIGN(len * 
> ostride[0], 32));
>                  if (!obuf[0]) {

space around =


There are more similar issues in the rest of the patch.  Please look for
them and resend.

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

Reply via email to