patch-modules_codec_avcodec_video_c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --- vlc-2.2.6.orig/modules/codec/avcodec/video.c 2016-09-27 09:56:26.000000000 +0200
  2. +++ vlc-2.2.6/modules/codec/avcodec/video.c 2017-06-06 22:52:46.745071498 +0200
  3. @@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC
  4. static int ffmpeg_GetFrameBuf ( struct AVCodecContext *, AVFrame * );
  5. static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
  6. #endif
  7. -static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
  8. - const enum PixelFormat * );
  9. +static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *,
  10. + const enum AVPixelFormat * );
  11. static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
  12. {
  13. @@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
  14. p_sys->p_codec = p_codec;
  15. p_sys->i_codec_id = i_codec_id;
  16. p_sys->psz_namecodec = psz_namecodec;
  17. - p_sys->p_ff_pic = avcodec_alloc_frame();
  18. + p_sys->p_ff_pic = av_frame_alloc();
  19. p_sys->b_delayed_open = true;
  20. p_sys->p_va = NULL;
  21. vlc_sem_init( &p_sys->sem_mt, 0 );
  22. @@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
  23. if( ffmpeg_OpenCodec( p_dec ) < 0 )
  24. {
  25. msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
  26. - avcodec_free_frame( &p_sys->p_ff_pic );
  27. + av_frame_free( &p_sys->p_ff_pic );
  28. vlc_sem_destroy( &p_sys->sem_mt );
  29. free( p_sys );
  30. return VLC_EGENERIC;
  31. @@ -847,7 +847,7 @@ void EndVideoDec( decoder_t *p_dec )
  32. wait_mt( p_sys );
  33. if( p_sys->p_ff_pic )
  34. - avcodec_free_frame( &p_sys->p_ff_pic );
  35. + av_frame_free( &p_sys->p_ff_pic );
  36. if( p_sys->p_va )
  37. vlc_va_Delete( p_sys->p_va );
  38. @@ -1334,8 +1334,8 @@ static void ffmpeg_ReleaseFrameBuf( stru
  39. }
  40. #endif
  41. -static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
  42. - const enum PixelFormat *pi_fmt )
  43. +static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
  44. + const enum AVPixelFormat *pi_fmt )
  45. {
  46. decoder_t *p_dec = p_context->opaque;
  47. decoder_sys_t *p_sys = p_dec->p_sys;