Skip to content

Commit

Permalink
support ffmpeg3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Félix Piédallu committed Apr 18, 2016
1 parent 9d66705 commit 6e5acde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fofix/core/VideoPlayer/VideoPlayer.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6e5acde

Please sign in to comment.