From 3ac81e2860abe2984ed0608b399d23a65674dd95 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 28 Aug 2015 15:40:49 +0200 Subject: [PATCH] enable vp9 by default --- Makefile | 2 +- src/oxframe.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dfa262c..f548f79 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ BINDIR ?= ${DESTDIR}${PREFIX}/bin MAN1DIR ?= ${DESTDIR}${PREFIX}/man/man1 CC ?= gcc -CFLAGS ?= -Wall -Wno-parantheses -O3 +CFLAGS ?= -Wall -Wno-parantheses -O3 -DHAVE_VP9=1 FLAGS += -ffast-math -fsigned-char -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops FLAGS = ${CFLAGS} FLAGS += -I. -Isrc -Isrc/halloc diff --git a/src/oxframe.c b/src/oxframe.c index 56d25a5..a8d747a 100644 --- a/src/oxframe.c +++ b/src/oxframe.c @@ -381,12 +381,14 @@ int extract_frame_webm(oxstate *state) { if (type == NESTEGG_TRACK_VIDEO) { /* Initialize codec */ if (codec_id == NESTEGG_CODEC_VP8) { - if(vpx_codec_dec_init(&codec, &vpx_codec_vp8_dx_algo, NULL, flags)) + if(vpx_codec_dec_init(&codec, &vpx_codec_vp8_dx_algo, NULL, flags)) { die_codec(&codec, "Failed to initialize decoder"); + } #ifdef HAVE_VP9 } else if (codec_id == NESTEGG_CODEC_VP9) { - if(vpx_codec_dec_init(&codec, &vpx_codec_vp9_dx_algo, NULL, flags)) + if(vpx_codec_dec_init(&codec, &vpx_codec_vp9_dx_algo, NULL, flags)) { die_codec(&codec, "Failed to initialize decoder"); + } #endif } else { fprintf(stderr, "unsupported video codec %d\n", codec_id);