add avconv support
This commit is contained in:
committed by
Norman Feske
parent
000dd13860
commit
98f052076f
21
src/app/avconv/avconv.patch
Normal file
21
src/app/avconv/avconv.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
- avoid compile error "‘for’ loop initial declarations are only
|
||||
allowed in C99 or C11 mode"
|
||||
|
||||
+++ src/lib/libav/avconv.c
|
||||
@@ -426,6 +426,7 @@ static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf)
|
||||
int h_chroma_shift, v_chroma_shift;
|
||||
int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1
|
||||
int w = s->width, h = s->height;
|
||||
+ int i;
|
||||
|
||||
if (!buf)
|
||||
return AVERROR(ENOMEM);
|
||||
@@ -449,7 +450,7 @@ static int alloc_buffer(InputStream *ist, FrameBuffer **pbuf)
|
||||
memset(buf->base[0], 128, ret);
|
||||
|
||||
avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
|
||||
- for (int i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
||||
+ for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
||||
const int h_shift = i==0 ? 0 : h_chroma_shift;
|
||||
const int v_shift = i==0 ? 0 : v_chroma_shift;
|
||||
if (s->flags & CODEC_FLAG_EMU_EDGE)
|
||||
23
src/app/avconv/target.mk
Normal file
23
src/app/avconv/target.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
include $(REP_DIR)/lib/import/import-av.inc
|
||||
|
||||
TARGET = avconv
|
||||
SRC_C = avconv.c cmdutils.c avconv_opt.c avconv_filter.c
|
||||
LIBS += avfilter avformat avcodec avutil avdevice swscale avresample
|
||||
LIBS += base posix
|
||||
|
||||
CC_WARN += -Wno-parentheses -Wno-switch -Wno-uninitialized \
|
||||
-Wno-format-zero-length -Wno-pointer-sign
|
||||
|
||||
LIBAV_PORT_DIR := $(call select_from_ports,libav)
|
||||
|
||||
# version.h
|
||||
INC_DIR += $(PRG_DIR)
|
||||
|
||||
# config.h
|
||||
INC_DIR += $(REP_DIR)/src/lib/libav
|
||||
|
||||
CC_C_OPT += -DLIBAV_VERSION=\"0.8\"
|
||||
|
||||
vpath %.c $(LIBAV_PORT_DIR)/src/lib/libav
|
||||
|
||||
CC_CXX_WARN_STRICT =
|
||||
0
src/app/avconv/version.h
Normal file
0
src/app/avconv/version.h
Normal file
Reference in New Issue
Block a user