From 6e5acde072e1e5b6c1c915759ed6b243925e2c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 18 Apr 2016 15:29:00 +0200 Subject: [PATCH] support ffmpeg3.0 --- fofix/core/VideoPlayer/VideoPlayer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fofix/core/VideoPlayer/VideoPlayer.c b/fofix/core/VideoPlayer/VideoPlayer.c index 44d5bb81b..e424473f3 100644 --- a/fofix/core/VideoPlayer/VideoPlayer.c +++ b/fofix/core/VideoPlayer/VideoPlayer.c @@ -203,20 +203,20 @@ static gboolean demux_headers(VideoPlayer* player, GError** err) player->tex_buffer = g_malloc(player->tex_width * player->tex_height * 4); switch (player->tinfo.pixel_fmt) { case TH_PF_420: - pix_format = PIX_FMT_YUV420P; + pix_format = AV_PIX_FMT_YUV420P; break; case TH_PF_422: - pix_format = PIX_FMT_YUV422P; + pix_format = AV_PIX_FMT_YUV422P; break; case TH_PF_444: - pix_format = PIX_FMT_YUV444P; + pix_format = AV_PIX_FMT_YUV444P; break; default: g_set_error(err, VIDEO_PLAYER_ERROR, VIDEO_PLAYER_BAD_HEADERS, "Bad pixel format in Theora stream."); return FALSE; } - player->sws_context = sws_getContext(player->tinfo.pic_width, player->tinfo.pic_height, pix_format, player->tex_width, player->tex_height, PIX_FMT_RGBA, SWS_FAST_BILINEAR, NULL, NULL, NULL); + player->sws_context = sws_getContext(player->tinfo.pic_width, player->tinfo.pic_height, pix_format, player->tex_width, player->tex_height, AV_PIX_FMT_RGBA, SWS_FAST_BILINEAR, NULL, NULL, NULL); glBindTexture(GL_TEXTURE_2D, player->video_texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);