1Description: Backport changes for the libav 9 API
2 Also replace loading of libavcodec and libavutil via dlopen by linking against
3 it.
4Author: Sebastian Ramacher <sramacher@debian.org>
5Bug-Debian: http://bugs.debian.org/720824
6Last-Update: 2013-09-12
7
8--- a/plugins/video/H.263-1998/h263-1998.cxx
9+++ b/plugins/video/H.263-1998/h263-1998.cxx
10@@ -216,7 +216,7 @@
11 return false;
12 }
13
14- m_context = FFMPEGLibraryInstance.AvcodecAllocContext();
15+ m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec);
16 if (m_context == NULL) {
17 PTRACE(1, m_prefix, "Failed to allocate context for encoder");
18 return false;
19@@ -312,6 +312,7 @@
20 return;
21 }
22
23+#ifdef CODEC_FLAG_H263P_UMV
24 if (STRCMPI(option, H263_ANNEX_D) == 0) {
25 // Annex D: Unrestructed Motion Vectors
26 // Level 2+
27@@ -322,6 +323,7 @@
28 m_context->flags &= ~CODEC_FLAG_H263P_UMV;
29 return;
30 }
31+#endif
32
33 #if 0 // DO NOT ENABLE THIS FLAG. FFMPEG IS NOT THREAD_SAFE WHEN THIS FLAG IS SET
34 if (STRCMPI(option, H263_ANNEX_F) == 0) {
35@@ -356,6 +358,7 @@
36 return;
37 }
38
39+#ifdef CODEC_FLAG_H263P_SLICE_STRUCT
40 if (STRCMPI(option, H263_ANNEX_K) == 0) {
41 // Annex K: Slice Structure
42 // does not work with eyeBeam
43@@ -365,7 +368,9 @@
44 m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
45 return;
46 }
47+#endif
48
49+#ifdef CODEC_FLAG_H263P_AIV
50 if (STRCMPI(option, H263_ANNEX_S) == 0) {
51 // Annex S: Alternative INTER VLC mode
52 // does not work with eyeBeam
53@@ -375,6 +380,7 @@
54 m_context->flags &= ~CODEC_FLAG_H263P_AIV;
55 return;
56 }
57+#endif
58
59 if (STRCMPI(option, PLUGINCODEC_MEDIA_PACKETIZATION) == 0 ||
60 STRCMPI(option, PLUGINCODEC_MEDIA_PACKETIZATIONS) == 0) {
61@@ -450,15 +456,6 @@
62 PTRACE(5, m_prefix, "qmax set to " << m_context->qmax);
63 PTRACE(5, m_prefix, "payload size set to " << m_context->rtp_payload_size);
64
65- #define CODEC_TRACER_FLAG(tracer, flag) \
66- PTRACE(4, m_prefix, #flag " is " << ((m_context->flags & flag) ? "enabled" : "disabled"));
67- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_UMV);
68- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_OBMC);
69- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_AC_PRED);
70- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_SLICE_STRUCT)
71- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_LOOP_FILTER);
72- CODEC_TRACER_FLAG(tracer, CODEC_FLAG_H263P_AIV);
73-
74 return FFMPEGLibraryInstance.AvcodecOpen(m_context, m_codec) == 0;
75 }
76
77@@ -521,7 +518,7 @@
78
79 // Need to copy to local buffer to guarantee 16 byte alignment
80 memcpy(m_inputFrame->data[0], OPAL_VIDEO_FRAME_DATA_PTR(header), header->width*header->height*3/2);
81- m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? FF_I_TYPE : AV_PICTURE_TYPE_NONE;
82+ m_inputFrame->pict_type = (flags & PluginCodec_CoderForceIFrame) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_NONE;
83
84 /*
85 m_inputFrame->pts = (int64_t)srcRTP.GetTimestamp()*m_context->time_base.den/m_context->time_base.num/VIDEO_CLOCKRATE;
86@@ -603,13 +600,19 @@
87 m_context->rtp_callback = &H263_RFC2190_EncoderContext::RTPCallBack;
88 m_context->opaque = this; // used to separate out packets from different encode threads
89
90+#ifdef CODEC_FLAG_H263P_UMV
91 m_context->flags &= ~CODEC_FLAG_H263P_UMV;
92+#endif
93 m_context->flags &= ~CODEC_FLAG_4MV;
94 #if LIBAVCODEC_RTP_MODE
95 m_context->flags &= ~CODEC_FLAG_H263P_AIC;
96 #endif
97+#ifdef CODEC_FLAG_H263P_AIV
98 m_context->flags &= ~CODEC_FLAG_H263P_AIV;
99+#endif
100+#ifdef CODEC_FLAG_H263P_SLICE_STRUCT
101 m_context->flags &= ~CODEC_FLAG_H263P_SLICE_STRUCT;
102+#endif
103
104 return true;
105 }
106@@ -658,7 +661,7 @@
107 return;
108 }
109
110- m_context = FFMPEGLibraryInstance.AvcodecAllocContext();
111+ m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec);
112 if (m_context == NULL) {
113 PTRACE(1, m_prefix, "Failed to allocate context for decoder");
114 return;
115--- a/plugins/video/H.264/h264-x264.cxx
116+++ b/plugins/video/H.264/h264-x264.cxx
117@@ -48,6 +48,7 @@
118 #include "shared/h264frame.h"
119 #include "shared/x264wrap.h"
120
121+#include <cstdio>
122
123 #define MY_CODEC x264 // Name of codec (use C variable characters)
124 #define MY_CODEC_LOG "x264"
125@@ -1067,18 +1068,17 @@
126 if ((m_codec = FFMPEGLibraryInstance.AvcodecFindDecoder(CODEC_ID_H264)) == NULL)
127 return false;
128
129- if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext()) == NULL)
130+ if ((m_context = FFMPEGLibraryInstance.AvcodecAllocContext(m_codec)) == NULL)
131 return false;
132
133 m_context->workaround_bugs = FF_BUG_AUTODETECT;
134- m_context->error_recognition = FF_ER_AGGRESSIVE;
135 m_context->idct_algo = FF_IDCT_H264;
136 m_context->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
137 m_context->flags = CODEC_FLAG_INPUT_PRESERVED | CODEC_FLAG_EMU_EDGE;
138- m_context->flags2 = CODEC_FLAG2_BRDO |
139- CODEC_FLAG2_MEMC_ONLY |
140+ m_context->flags2 = CODEC_FLAG2_SKIP_RD |
141+#ifdef CODEC_FLAG2_DROP_FRAME_TIMECODE
142 CODEC_FLAG2_DROP_FRAME_TIMECODE |
143- CODEC_FLAG2_SKIP_RD |
144+#endif
145 CODEC_FLAG2_CHUNKS;
146
147 if ((m_picture = FFMPEGLibraryInstance.AvcodecAllocFrame()) == NULL)
148--- a/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
149+++ b/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
150@@ -589,17 +589,14 @@
151 m_avpicture->quality = m_videoQMin;
152
153 #ifdef USE_ORIG
154- m_avcontext->flags |= CODEC_FLAG_PART; // data partitioning
155 m_avcontext->flags |= CODEC_FLAG_4MV; // 4 motion vectors
156 #else
157 m_avcontext->max_b_frames=0; /*don't use b frames*/
158 m_avcontext->flags|=CODEC_FLAG_AC_PRED;
159- m_avcontext->flags|=CODEC_FLAG_H263P_UMV;
160 /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */
161 m_avcontext->flags|=CODEC_FLAG_4MV;
162 m_avcontext->flags|=CODEC_FLAG_GMC;
163 m_avcontext->flags|=CODEC_FLAG_LOOP_FILTER;
164- m_avcontext->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
165 #endif
166 m_avcontext->opaque = this; // for use in RTP callback
167 }
168@@ -691,7 +688,12 @@
169
170 bool MPEG4EncoderContext::OpenCodec()
171 {
172- m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext();
173+ if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
174+ PTRACE(1, "MPEG4", "Encoder not found");
175+ return false;
176+ }
177+
178+ m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext(m_avcodec);
179 if (m_avcontext == NULL) {
180 PTRACE(1, "MPEG4", "Encoder failed to allocate context for encoder");
181 return false;
182@@ -703,11 +705,6 @@
183 return false;
184 }
185
186- if((m_avcodec = FFMPEGLibraryInstance.AvcodecFindEncoder(CODEC_ID_MPEG4)) == NULL){
187- PTRACE(1, "MPEG4", "Encoder not found");
188- return false;
189- }
190-
191 #if PLUGINCODEC_TRACING
192 // debugging flags
193 if (PTRACE_CHECK(4)) {
194@@ -804,7 +801,7 @@
195 // Should the next frame be an I-Frame?
196 if ((flags & PluginCodec_CoderForceIFrame) || (m_frameNum == 0))
197 {
198- m_avpicture->pict_type = FF_I_TYPE;
199+ m_avpicture->pict_type = AV_PICTURE_TYPE_I;
200 }
201 else // No IFrame requested, let avcodec decide what to do
202 {
203@@ -1325,7 +1322,6 @@
204
205 void MPEG4DecoderContext::SetStaticDecodingParams() {
206 m_avcontext->flags |= CODEC_FLAG_4MV;
207- m_avcontext->flags |= CODEC_FLAG_PART;
208 m_avcontext->workaround_bugs = 0; // no workaround for buggy implementations
209 }
210
211@@ -1399,7 +1395,7 @@
212 return false;
213 }
214
215- m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext();
216+ m_avcontext = FFMPEGLibraryInstance.AvcodecAllocContext(m_avcodec);
217 if (m_avcontext == NULL) {
218 PTRACE(1, "MPEG4", "Decoder failed to allocate context");
219 return false;
220--- a/plugins/video/common/dyna.cxx
221+++ b/plugins/video/common/dyna.cxx
222@@ -38,6 +38,13 @@
223 * Matthias Schneider (ma30002000@yahoo.de)
224 */
225 #include "dyna.h"
226+#include <cstdio>
227+#include <cstdarg>
228+
229+extern "C" {
230+#include <libavcodec/avcodec.h>
231+#include <libavutil/mem.h>
232+}
233
234 bool DynaLink::Open(const char *name)
235 {
236@@ -228,101 +235,15 @@
237 m_libAvutil.Close();
238 }
239
240-#define CHECK_AVUTIL(name, func) \
241- (seperateLibAvutil ? \
242- m_libAvutil.GetFunction(name, (DynaLink::Function &)func) : \
243- m_libAvcodec.GetFunction(name, (DynaLink::Function &)func) \
244- ) \
245-
246-
247 bool FFMPEGLibrary::Load()
248 {
249 WaitAndSignal m(processLock);
250 if (IsLoaded())
251 return true;
252
253- bool seperateLibAvutil = false;
254-
255-#ifdef LIBAVCODEC_LIB_NAME
256- if (m_libAvcodec.Open(LIBAVCODEC_LIB_NAME))
257- seperateLibAvutil = true;
258- else
259-#endif
260- if (m_libAvcodec.Open("libavcodec"))
261- seperateLibAvutil = false;
262- else if (m_libAvcodec.Open("avcodec-" AV_STRINGIFY(LIBAVCODEC_VERSION_MAJOR)))
263- seperateLibAvutil = true;
264- else {
265- PTRACE(1, m_codecString, "Failed to load FFMPEG libavcodec library");
266- return false;
267- }
268-
269- if (seperateLibAvutil &&
270- !(
271-#ifdef LIBAVUTIL_LIB_NAME
272- m_libAvutil.Open(LIBAVUTIL_LIB_NAME) ||
273-#endif
274- m_libAvutil.Open("libavutil") ||
275- m_libAvutil.Open("avutil-" AV_STRINGIFY(LIBAVUTIL_VERSION_MAJOR))
276- ) ) {
277- PTRACE(1, m_codecString, "Failed to load FFMPEG libavutil library");
278- return false;
279- }
280-
281- strcpy(m_libAvcodec.m_codecString, m_codecString);
282- strcpy(m_libAvutil.m_codecString, m_codecString);
283-
284- if (!m_libAvcodec.GetFunction("avcodec_init", (DynaLink::Function &)Favcodec_init))
285- return false;
286-
287- if (!m_libAvcodec.GetFunction("av_init_packet", (DynaLink::Function &)Fav_init_packet))
288- return false;
289-
290- if (!m_libAvcodec.GetFunction("avcodec_register_all", (DynaLink::Function &)Favcodec_register_all))
291- return false;
292-
293- if (!m_libAvcodec.GetFunction("avcodec_find_encoder", (DynaLink::Function &)Favcodec_find_encoder))
294- return false;
295-
296- if (!m_libAvcodec.GetFunction("avcodec_find_decoder", (DynaLink::Function &)Favcodec_find_decoder))
297- return false;
298-
299- if (!m_libAvcodec.GetFunction("avcodec_alloc_context", (DynaLink::Function &)Favcodec_alloc_context))
300- return false;
301-
302- if (!m_libAvcodec.GetFunction("avcodec_alloc_frame", (DynaLink::Function &)Favcodec_alloc_frame))
303- return false;
304-
305- if (!m_libAvcodec.GetFunction("avcodec_open", (DynaLink::Function &)Favcodec_open))
306- return false;
307-
308- if (!m_libAvcodec.GetFunction("avcodec_close", (DynaLink::Function &)Favcodec_close))
309- return false;
310-
311- if (!m_libAvcodec.GetFunction("avcodec_encode_video", (DynaLink::Function &)Favcodec_encode_video))
312- return false;
313-
314- if (!m_libAvcodec.GetFunction("avcodec_decode_video2", (DynaLink::Function &)Favcodec_decode_video))
315- return false;
316-
317- if (!m_libAvcodec.GetFunction("avcodec_set_dimensions", (DynaLink::Function &)Favcodec_set_dimensions))
318- return false;
319-
320- if (!CHECK_AVUTIL("av_free", Favcodec_free))
321- return false;
322-
323- if(!m_libAvcodec.GetFunction("avcodec_version", (DynaLink::Function &)Favcodec_version))
324- return false;
325-
326- if (!CHECK_AVUTIL("av_log_set_level", FAv_log_set_level))
327- return false;
328-
329- if (!CHECK_AVUTIL("av_log_set_callback", FAv_log_set_callback))
330- return false;
331-
332 // must be called before using avcodec lib
333
334- unsigned libVer = Favcodec_version();
335+ unsigned libVer = avcodec_version();
336 if (libVer != LIBAVCODEC_VERSION_INT) {
337 PTRACE(2, m_codecString, "Warning: compiled against libavcodec headers from version "
338 << LIBAVCODEC_VERSION_MAJOR << '.' << LIBAVCODEC_VERSION_MINOR << '.' << LIBAVCODEC_VERSION_MICRO
339@@ -334,8 +255,7 @@
340 << (libVer >> 16) << ((libVer>>8) & 0xff) << (libVer & 0xff));
341 }
342
343- Favcodec_init();
344- Favcodec_register_all ();
345+ avcodec_register_all();
346
347 #if PLUGINCODEC_TRACING
348 AvLogSetLevel(AV_LOG_DEBUG);
349@@ -350,49 +270,49 @@
350
351 AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
352 {
353- return Favcodec_find_encoder(id);
354+ return avcodec_find_encoder(id);
355 }
356
357 AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
358 {
359 WaitAndSignal m(processLock);
360
361- return Favcodec_find_decoder(id);
362+ return avcodec_find_decoder(id);
363 }
364
365-AVCodecContext *FFMPEGLibrary::AvcodecAllocContext(void)
366+AVCodecContext *FFMPEGLibrary::AvcodecAllocContext(AVCodec *codec)
367 {
368 WaitAndSignal m(processLock);
369
370- return Favcodec_alloc_context();
371+ return avcodec_alloc_context3(codec);
372 }
373
374 AVFrame *FFMPEGLibrary::AvcodecAllocFrame(void)
375 {
376 WaitAndSignal m(processLock);
377
378- return Favcodec_alloc_frame();
379+ return avcodec_alloc_frame();
380 }
381
382 int FFMPEGLibrary::AvcodecOpen(AVCodecContext *ctx, AVCodec *codec)
383 {
384 WaitAndSignal m(processLock);
385
386- return Favcodec_open(ctx, codec);
387+ return avcodec_open2(ctx, codec, NULL);
388 }
389
390 int FFMPEGLibrary::AvcodecClose(AVCodecContext *ctx)
391 {
392 WaitAndSignal m(processLock);
393
394- return Favcodec_close(ctx);
395+ return avcodec_close(ctx);
396 }
397
398 int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict)
399 {
400 int res;
401
402- res = Favcodec_encode_video(ctx, buf, buf_size, pict);
403+ res = avcodec_encode_video(ctx, buf, buf_size, pict);
404
405 PTRACE(6, m_codecString, "DYNA\tEncoded into " << res << " bytes, max " << buf_size);
406 return res;
407@@ -401,35 +321,35 @@
408 int FFMPEGLibrary::AvcodecDecodeVideo(AVCodecContext *ctx, AVFrame *pict, int *got_picture_ptr, BYTE *buf, int buf_size)
409 {
410 AVPacket avpkt;
411- Fav_init_packet(&avpkt);
412+ av_init_packet(&avpkt);
413 avpkt.data = buf;
414 avpkt.size = buf_size;
415
416- return Favcodec_decode_video(ctx, pict, got_picture_ptr, &avpkt);
417+ return avcodec_decode_video2(ctx, pict, got_picture_ptr, &avpkt);
418 }
419
420 void FFMPEGLibrary::AvcodecFree(void * ptr)
421 {
422 WaitAndSignal m(processLock);
423
424- Favcodec_free(ptr);
425+ av_free(ptr);
426 }
427
428 void FFMPEGLibrary::AvSetDimensions(AVCodecContext *s, int width, int height)
429 {
430 WaitAndSignal m(processLock);
431
432- Favcodec_set_dimensions(s, width, height);
433+ avcodec_set_dimensions(s, width, height);
434 }
435
436 void FFMPEGLibrary::AvLogSetLevel(int level)
437 {
438- FAv_log_set_level(level);
439+ av_log_set_level(level);
440 }
441
442 void FFMPEGLibrary::AvLogSetCallback(void (*callback)(void*, int, const char*, va_list))
443 {
444- FAv_log_set_callback(callback);
445+ av_log_set_callback(callback);
446 }
447
448 bool FFMPEGLibrary::IsLoaded()
449--- a/plugins/video/common/dyna.h
450+++ b/plugins/video/common/dyna.h
451@@ -95,7 +95,7 @@
452
453 AVCodec *AvcodecFindEncoder(enum CodecID id);
454 AVCodec *AvcodecFindDecoder(enum CodecID id);
455- AVCodecContext *AvcodecAllocContext(void);
456+ AVCodecContext *AvcodecAllocContext(AVCodec*);
457 AVFrame *AvcodecAllocFrame(void);
458 int AvcodecOpen(AVCodecContext *ctx, AVCodec *codec);
459 int AvcodecClose(AVCodecContext *ctx);
460@@ -120,26 +120,6 @@
461 CodecID m_codec;
462 char m_codecString[32];
463
464- void (*Favcodec_init)(void);
465- void (*Fav_init_packet)(AVPacket *pkt);
466-
467- void (*Favcodec_register_all)(void);
468- AVCodec *(*Favcodec_find_encoder)(enum CodecID id);
469- AVCodec *(*Favcodec_find_decoder)(enum CodecID id);
470- AVCodecContext *(*Favcodec_alloc_context)(void);
471- AVFrame *(*Favcodec_alloc_frame)(void);
472- int (*Favcodec_open)(AVCodecContext *ctx, AVCodec *codec);
473- int (*Favcodec_close)(AVCodecContext *ctx);
474- int (*Favcodec_encode_video)(AVCodecContext *ctx, BYTE *buf, int buf_size, const AVFrame *pict);
475- int (*Favcodec_decode_video)(AVCodecContext *ctx, AVFrame *pict, int *got_picture_ptr, AVPacket *avpkt);
476- unsigned (*Favcodec_version)(void);
477- void (*Favcodec_set_dimensions)(AVCodecContext *ctx, int width, int height);
478-
479- void (*Favcodec_free)(void *);
480-
481- void (*FAv_log_set_level)(int level);
482- void (*FAv_log_set_callback)(void (*callback)(void*, int, const char*, va_list));
483-
484 bool m_isLoadedOK;
485 };
486
487--- a/plugins/video/common/ffmpeg.h
488+++ b/plugins/video/common/ffmpeg.h
489@@ -45,11 +45,13 @@
490
491 #include "platform.h"
492
493-#include "libavcodec/avcodec.h"
494+extern "C" {
495+#include <libavcodec/avcodec.h>
496 // AVPacket was declared in avformat.h before April 2009
497 #if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52, 25, 0)
498-#include "libavformat/avformat.h"
499+#include <libavformat/avformat.h>
500 #endif
501+}
502
503 #ifndef LIBAVCODEC_VERSION_INT
504 #error Libavcodec include is not correct
505--- a/plugins/video/H.263-1998/Makefile.in
506+++ b/plugins/video/H.263-1998/Makefile.in
507@@ -34,8 +34,8 @@
508 $(COMMONDIR)/mpi.cxx \
509 $(COMMONDIR)/dyna.cxx
510
511-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
512-LIBS += @DL_LIBS@
513+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR)
514+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
515
516 HAVE_LIBAVCODEC_RTP_MODE=@HAVE_LIBAVCODEC_RTP_MODE@
517 ifeq ($(HAVE_LIBAVCODEC_RTP_MODE),yes)
518--- a/plugins/video/H.264/Makefile.in
519+++ b/plugins/video/H.264/Makefile.in
520@@ -34,8 +34,8 @@
521 $(SHAREDDIR)/x264wrap.cxx \
522 $(COMMONDIR)/dyna.cxx \
523
524-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR) -DLIB_DIR='"$(libdir)"' -DVC_PLUGIN_DIR='"@VC_PLUGIN_DIR@"'
525-LIBS += @DL_LIBS@
526+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR) -DLIB_DIR='"$(libdir)"' -DVC_PLUGIN_DIR='"@VC_PLUGIN_DIR@"'
527+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
528
529 IS_H264_LICENSED:=@IS_H264_LICENSED@
530 ifeq ($(IS_H264_LICENSED),yes)
531--- a/plugins/video/MPEG4-ffmpeg/Makefile.in
532+++ b/plugins/video/MPEG4-ffmpeg/Makefile.in
533@@ -30,8 +30,8 @@
534 SRCDIR := .
535 SRCS := mpeg4.cxx $(COMMONDIR)/dyna.cxx
536
537-CFLAGS += @LIBAVCODEC_CFLAGS@ -I$(COMMONDIR)
538-LIBS += @DL_LIBS@
539+CFLAGS += @LIBAVCODEC_CFLAGS@ @LIBAVUTIL_CFLAGS@ -I$(COMMONDIR)
540+LIBS += @DL_LIBS@ @LIBAVCODEC_LIBS@ @LIBAVUTIL_LIBS@
541
542 # Add LIBAVCODEC_SOURCE_DIR to the include path so we can #include <libavcodec/...h>
543 # Also add libavutil, so ffmpeg headers can #include "log.h".