ソースを参照

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.
jp9000 11 年 前
コミット
8b0315ada6
1 ファイル変更2 行追加2 行削除
  1. 2 2
      libobs/graphics/graphics-ffmpeg.c

+ 2 - 2
libobs/graphics/graphics-ffmpeg.c

@@ -121,7 +121,7 @@ static bool ffmpeg_image_decode(struct ffmpeg_image *info, uint8_t *out,
 {
 {
 	AVPacket          packet    = {0};
 	AVPacket          packet    = {0};
 	bool              success   = false;
 	bool              success   = false;
-	AVFrame           *frame    = av_frame_alloc();
+	AVFrame           *frame    = avcodec_alloc_frame();
 	int               got_frame = 0;
 	int               got_frame = 0;
 	int               ret;
 	int               ret;
 
 
@@ -152,7 +152,7 @@ static bool ffmpeg_image_decode(struct ffmpeg_image *info, uint8_t *out,
 
 
 fail:
 fail:
 	av_free_packet(&packet);
 	av_free_packet(&packet);
-	av_frame_free(&frame);
+	avcodec_free_frame(&frame);
 	return success;
 	return success;
 }
 }