summaryrefslogtreecommitdiff
path: root/src/libffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg')
-rw-r--r--src/libffmpeg/Makefile.am20
-rw-r--r--src/libffmpeg/ffmpeg_encoder.c5
2 files changed, 7 insertions, 18 deletions
diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am
index 42fe20f95..784be31c1 100644
--- a/src/libffmpeg/Makefile.am
+++ b/src/libffmpeg/Makefile.am
@@ -4,23 +4,11 @@ AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
AM_CPPFLAGS = $(ZLIB_CPPFLAGS)
AM_LDFLAGS = $(xineplug_ldflags)
-if WITH_EXTERNAL_FFMPEG
-AM_CFLAGS += $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
-link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS)
-else
-AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libavutil \
- -I$(top_srcdir)/contrib/ffmpeg/libavcodec \
- -I$(top_srcdir)/contrib/ffmpeg/libpostproc
-link_ffmpeg = $(top_builddir)/contrib/ffmpeg/libavcodec/libavcodec.a \
- $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a \
- $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a
+if !WITH_EXTERNAL_FFMPEG
$(top_builddir)/contrib/ffmpeg/libavcodec/libavcodec.a:
$(MAKE) -C $(top_builddir)/contrib/ ffmpeg/libavcodec/libavcodec.a
-$(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a:
- $(MAKE) -C $(top_builddir)/contrib/ ffmpeg/libavutil/libavutil.a
-
$(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a:
$(MAKE) -C $(top_builddir)/contrib/ ffmpeg/libpostproc/libpostproc.a
@@ -53,10 +41,12 @@ endif
nodist_xineplug_decode_ff_la_SOURCES = ffmpeg_config.h
+xineplug_decode_ff_la_CFLAGS = $(AM_CFLAGS) $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS)
xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \
- $(link_ffmpeg) $(PTHREAD_LIBS) $(LTLIBINTL)
+ $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
+xineplug_decode_ff_la_DEPS = $(FFMPEG_DEPS) $(FFMPEG_POSTPROC_DEPS)
xineplug_decode_ff_la_LDFLAGS = $(AM_LDFLAGS) $(IMPURE_TEXT_LDFLAGS)
xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c
xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) $(LTLIBINTL)
-xineplug_decode_dvaudio_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/contrib/ffmpeg/libavcodec
+xineplug_decode_dvaudio_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFMPEG_CFLAGS) -I$(top_srcdir)/contrib/ffmpeg/libavcodec
diff --git a/src/libffmpeg/ffmpeg_encoder.c b/src/libffmpeg/ffmpeg_encoder.c
index 7fe65c7fa..f7401f6ab 100644
--- a/src/libffmpeg/ffmpeg_encoder.c
+++ b/src/libffmpeg/ffmpeg_encoder.c
@@ -61,7 +61,7 @@ typedef struct lavc_data_s {
uint8_t *ffmpeg_buffer; /* lavc buffer */
AVFrame *picture; /* picture to be encoded */
uint8_t *out[3]; /* aligned buffer for YV12 data */
- uint8_t *buf; /* unaligned YV12 buffer */
+ uint8_t *buf; /* base address of YV12 buffer */
} lavc_data_t;
@@ -108,8 +108,7 @@ static int lavc_on_update_format(dxr3_driver_t *drv, dxr3_frame_t *frame)
if (frame->vo_frame.format == XINE_IMGFMT_YUY2) {
int image_size = frame->vo_frame.pitches[0] * frame->oheight;
- this->out[0] = xine_xmalloc_aligned(16, image_size * 3/2,
- (void *)&this->buf);
+ this->out[0] = this->buf = av_mallocz(image_size * 3/2);
this->out[1] = this->out[0] + image_size;
this->out[2] = this->out[1] + image_size/4;