oanastratulat

Untitled

Jan 11th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
  2. index 28176f3..f80b3ca 100644
  3. --- a/libavcodec/vorbis.c
  4. +++ b/libavcodec/vorbis.c
  5. @@ -179,12 +179,14 @@ static inline void render_line_unrolled(intptr_t x, uint8_t y, int x1,
  6.      }
  7.  }
  8.  
  9. -static void render_line(int x0, uint8_t y0, int x1, int y1, float *buf)
  10. +static int render_line(int x0, uint8_t y0, int x1, int y1, float *buf)
  11.  {
  12.      int dy  = y1 - y0;
  13.      int adx = x1 - x0;
  14.      int ady = FFABS(dy);
  15.      int sy  = dy < 0 ? -1 : 1;
  16. +    if (adx == 0)
  17. +               return -1;
  18.      buf[x0] = ff_vorbis_floor1_inverse_db_table[y0];
  19.      if (ady*2 <= adx) { // optimized common case
  20.          render_line_unrolled(x0, y0, x1, sy, ady, adx, buf);
  21. @@ -204,6 +206,7 @@ static void render_line(int x0, uint8_t y0, int x1, int y1, float *buf)
  22.              buf[x] = ff_vorbis_floor1_inverse_db_table[y];
  23.          }
  24.      }
  25. +       return 1;
  26.  }
  27.  
  28.  void ff_vorbis_floor1_render_list(vorbis_floor1_entry * list, int values,
Advertisement
Add Comment
Please, Sign In to add comment