Guest User

Untitled

a guest
Jun 30th, 2010
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. From: Alexander Prikhodko <[email protected]>
  2. Date: Sat, 24 Apr 2010 18:41:25 +0300
  3. Subject: [PATCH] Fix GCC warning about sws_scale type cast
  4.  
  5. input/ffms.c | 2 +-
  6. input/lavf.c | 2 +-
  7. 2 files changed, 2 insertions(+), 2 deletions(-)
  8.  
  9. Index: input/ffms.c
  10. ===================================================================
  11. --- input/ffms_orig.c
  12. +++ input/ffms.c
  13. @@ -207,7 +207,7 @@ static int read_frame( x264_picture_t *p_pic, hnd_t handle, int i_frame )
  14. * With threaded input, copying the pointers would result in the data changing during encoding.
  15. * FIXME: don't do redundant sws_scales for singlethreaded input, or fix FFMS to allow
  16. * multiple FFMS_Frame buffers. */
  17. - sws_scale( h->scaler, (uint8_t**)frame->Data, (int*)frame->Linesize, 0,
  18. + sws_scale( h->scaler, (const uint8_t * const *)frame->Data, (int*)frame->Linesize, 0,
  19. frame->EncodedHeight, p_pic->img.plane, p_pic->img.i_stride );
  20.  
  21. const FFMS_FrameInfo *info = FFMS_GetFrameInfo( h->track, i_frame );
  22. Index: input/lavf.c
  23. ===================================================================
  24. --- input/lavf_orig.c
  25. +++ input/lavf.c
  26. @@ -121,7 +121,7 @@ static int read_frame_internal( x264_picture_t *p_pic, lavf_hnd_t *h, int i_fram
  27. if( check_swscale( h, c, i_frame ) )
  28. return -1;
  29. /* FIXME: avoid sws_scale where possible (no colorspace conversion). */
  30. - sws_scale( h->scaler, frame->data, frame->linesize, 0, c->height, p_pic->img.plane, p_pic->img.i_stride );
  31. + sws_scale( h->scaler, (const uint8_t * const *)frame->data, frame->linesize, 0, c->height, p_pic->img.plane, p_pic->img.i_stride );
  32.  
  33. if( info )
  34. {
Advertisement
Add Comment
Please, Sign In to add comment