From 8b0315ada62bdcd576c228a36ba8985e0a68dccf Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 28 Jun 2014 11:12:25 -0700 Subject: [PATCH] Use older FFmpeg API functions for AVFrame Compatibility with older FFmpeg versions may be broken if the av_frame_* functions are used instead of the avcodec_* equivalents. --- libobs/graphics/graphics-ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/graphics/graphics-ffmpeg.c b/libobs/graphics/graphics-ffmpeg.c index 3a80ce70f..8de821371 100644 --- a/libobs/graphics/graphics-ffmpeg.c +++ b/libobs/graphics/graphics-ffmpeg.c @@ -121,7 +121,7 @@ static bool ffmpeg_image_decode(struct ffmpeg_image *info, uint8_t *out, { AVPacket packet = {0}; bool success = false; - AVFrame *frame = av_frame_alloc(); + AVFrame *frame = avcodec_alloc_frame(); int got_frame = 0; int ret; @@ -152,7 +152,7 @@ static bool ffmpeg_image_decode(struct ffmpeg_image *info, uint8_t *out, fail: av_free_packet(&packet); - av_frame_free(&frame); + avcodec_free_frame(&frame); return success; }