freerdp-ffmpeg29.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. https://github.com/FreeRDP/FreeRDP/pull/2895
  2. Index: freerdp-1.2.1_pre20150326/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
  3. ===================================================================
  4. --- freerdp-1.2.1_pre20150326.orig/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
  5. +++ freerdp-1.2.1_pre20150326/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
  6. @@ -102,7 +102,7 @@ static BOOL tsmf_ffmpeg_init_video_strea
  7. mdecoder->codec_context->bit_rate = media_type->BitRate;
  8. mdecoder->codec_context->time_base.den = media_type->SamplesPerSecond.Numerator;
  9. mdecoder->codec_context->time_base.num = media_type->SamplesPerSecond.Denominator;
  10. - mdecoder->frame = avcodec_alloc_frame();
  11. + mdecoder->frame = av_frame_alloc();
  12. return TRUE;
  13. }
  14. @@ -320,7 +320,7 @@ static BOOL tsmf_ffmpeg_decode_video(ITS
  15. mdecoder->codec_context->width, mdecoder->codec_context->height);
  16. mdecoder->decoded_data = malloc(mdecoder->decoded_size);
  17. ZeroMemory(mdecoder->decoded_data, mdecoder->decoded_size);
  18. - frame = avcodec_alloc_frame();
  19. + frame = av_frame_alloc();
  20. avpicture_fill((AVPicture*) frame, mdecoder->decoded_data,
  21. mdecoder->codec_context->pix_fmt,
  22. mdecoder->codec_context->width, mdecoder->codec_context->height);
  23. @@ -389,7 +389,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITS
  24. (int16_t *) dst, &frame_size, src, src_size);
  25. #else
  26. {
  27. - AVFrame *decoded_frame = avcodec_alloc_frame();
  28. + AVFrame *decoded_frame = av_frame_alloc();
  29. int got_frame = 0;
  30. AVPacket pkt;
  31. av_init_packet(&pkt);
  32. @@ -469,7 +469,7 @@ static UINT32 tsmf_ffmpeg_get_decoded_fo
  33. switch (mdecoder->codec_context->pix_fmt)
  34. {
  35. - case PIX_FMT_YUV420P:
  36. + case AV_PIX_FMT_YUV420P:
  37. return RDP_PIXFMT_I420;
  38. default:
  39. WLog_ERR(TAG, "unsupported pixel format %u",