mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-31 00:22:31 +00:00
Put up with deprecations
This commit is contained in:
parent
a8f34c6960
commit
6e9e5b6907
@ -1166,24 +1166,11 @@ static void decode_thread(void *data)
|
||||
|
||||
if (video_stream >= 0)
|
||||
{
|
||||
AVPicture *converted_frame = (AVPicture*)conv_frame;
|
||||
|
||||
#if FF_API_AVPICTURE
|
||||
frame_size = av_image_get_buffer_size(PIX_FMT_RGB32, media.width, media.height, 1);
|
||||
#else
|
||||
frame_size = avpicture_get_size(PIX_FMT_RGB32, media.width, media.height);
|
||||
#endif
|
||||
conv_frame = av_frame_alloc();
|
||||
conv_frame_buf = av_malloc(frame_size);
|
||||
#if FF_API_AVPICTURE
|
||||
av_image_fill_arrays(converted_frame->data,
|
||||
converted_frame->linesize,
|
||||
(const uint8_t*)conv_frame_buf,
|
||||
PIX_FMT_RGB32, media.width, media.height, 1);
|
||||
#else
|
||||
avpicture_fill(converted_frame, (const uint8_t*)conv_frame_buf,
|
||||
avpicture_fill((AVPicture*)conv_frame, (const uint8_t*)conv_frame_buf,
|
||||
PIX_FMT_RGB32, media.width, media.height);
|
||||
#endif
|
||||
}
|
||||
|
||||
while (!decode_thread_dead)
|
||||
@ -1324,11 +1311,7 @@ static void decode_thread(void *data)
|
||||
avsubtitle_free(&sub);
|
||||
}
|
||||
|
||||
#if FF_API_AVPICTURE
|
||||
av_packet_unref(&pkt);
|
||||
#else
|
||||
av_free_packet(&pkt);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (sws)
|
||||
|
@ -507,28 +507,13 @@ static bool ffmpeg_init_video(ffmpeg_t *handle)
|
||||
|
||||
video->frame_drop_ratio = params->frame_drop_ratio;
|
||||
|
||||
#if FF_API_AVPICTURE
|
||||
size = av_image_get_buffer_size(video->pix_fmt, param->out_width,
|
||||
param->out_height, 1);
|
||||
#else
|
||||
size = avpicture_get_size(video->pix_fmt, param->out_width,
|
||||
param->out_height);
|
||||
#endif
|
||||
video->conv_frame_buf = (uint8_t*)av_malloc(size);
|
||||
video->conv_frame = av_frame_alloc();
|
||||
|
||||
{
|
||||
AVPicture *converted_frame = (AVPicture*)video->conv_frame;
|
||||
#if FF_API_AVPICTURE
|
||||
av_image_fill_arrays(converted_frame->data,
|
||||
converted_frame->linesize,
|
||||
video->conv_frame_buf,
|
||||
video->pix_fmt, param->out_width, param->out_height, 1);
|
||||
#else
|
||||
avpicture_fill(converted_frame, video->conv_frame_buf,
|
||||
avpicture_fill((AVPicture*)video->conv_frame, video->conv_frame_buf,
|
||||
video->pix_fmt, param->out_width, param->out_height);
|
||||
#endif
|
||||
}
|
||||
|
||||
video->conv_frame->width = param->out_width;
|
||||
video->conv_frame->height = param->out_height;
|
||||
|
Loading…
x
Reference in New Issue
Block a user