I get this error compiling with ubuntu 9.10.

It looks like FF_MM_MMX2 is not defined but FF_MM_MMXEXT is maybe that
is good enough?

also, LIBAVCODEC_VERSION_MAJOR seems to be 52 but those things are not defined.

Jay


make[2]: Entering directory
`/home/jay/git/freerdp-video/FreeRDP/channels/drdynvc/tsmf/ffmpeg'
  CC     tsmf_ffmpeg_la-tsmf_ffmpeg.lo
tsmf_ffmpeg.c: In function ‘tsmf_ffmpeg_init_audio_stream’:
tsmf_ffmpeg.c:93: error: ‘FF_MM_MMX2’ undeclared (first use in this function)
tsmf_ffmpeg.c:93: error: (Each undeclared identifier is reported only once
tsmf_ffmpeg.c:93: error: for each function it appears in.)
tsmf_ffmpeg.c: In function ‘tsmf_ffmpeg_decode_video’:
tsmf_ffmpeg.c:270: error: ‘AVPacket’ undeclared (first use in this function)
tsmf_ffmpeg.c:270: error: expected ‘;’ before ‘pkt’
tsmf_ffmpeg.c:271: warning: implicit declaration of function ‘av_init_packet’
tsmf_ffmpeg.c:271: error: ‘pkt’ undeclared (first use in this function)
tsmf_ffmpeg.c:275: error: ‘AV_PKT_FLAG_KEY’ undeclared (first use in
this function)
tsmf_ffmpeg.c:276: warning: implicit declaration of function
‘avcodec_decode_video2’
tsmf_ffmpeg.c: In function ‘tsmf_ffmpeg_decode_audio’:
tsmf_ffmpeg.c:363: error: ‘AVPacket’ undeclared (first use in this function)
tsmf_ffmpeg.c:363: error: expected ‘;’ before ‘pkt’
tsmf_ffmpeg.c:364: error: ‘pkt’ undeclared (first use in this function)
tsmf_ffmpeg.c:367: warning: implicit declaration of function
‘avcodec_decode_audio3’
make[2]: *** [tsmf_ffmpeg_la-tsmf_ffmpeg.lo] Error 1
make[2]: Leaving directory
`/home/jay/git/freerdp-video/FreeRDP/channels/drdynvc/tsmf/ffmpeg'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jay/git/freerdp-video/FreeRDP'
make: *** [all] Error 2

Patch to fix is.

diff --git a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
index 7e15226..96a3164 100644
--- a/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
+++ b/channels/drdynvc/tsmf/ffmpeg/tsmf_ffmpeg.c
@@ -90,7 +90,11 @@ tsmf_ffmpeg_init_audio_stream(ITSMFDecoder *
decoder, const TS_AM_MEDIA_TYPE * m

        /* FFmpeg's float_to_int16_interleave_sse2 would crash at
least in WMA decoder.
           We disable sse2 to workaround it, however this should be
further investigated. */
+#if LIBAVCODEC_VERSION_MAJOR < 53
+       mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMXEXT;
+#else
        mdecoder->codec_context->dsp_mask = FF_MM_SSE2 | FF_MM_MMX2;
+#endif

        return 0;
 }
@@ -261,7 +265,7 @@ tsmf_ffmpeg_decode_video(ITSMFDecoder * decoder,
const uint8 * data, uint32 data
        int ret = 0;
        AVFrame * frame;

-#if LIBAVCODEC_VERSION_MAJOR < 52
+#if LIBAVCODEC_VERSION_MAJOR < 53
        len = avcodec_decode_video(mdecoder->codec_context,
mdecoder->frame, &decoded, data, data_size);
 #else
        {
@@ -351,7 +355,7 @@ tsmf_ffmpeg_decode_audio(ITSMFDecoder * decoder,
const uint8 * data, uint32 data
                        dst = mdecoder->decoded_data + mdecoder->decoded_size;
                }
                frame_size = mdecoder->decoded_size_max -
mdecoder->decoded_size;
-#if LIBAVCODEC_VERSION_MAJOR < 52
+#if LIBAVCODEC_VERSION_MAJOR < 53
                len = avcodec_decode_audio2(mdecoder->codec_context,
                        (int16_t *) dst, &frame_size,
                        src, src_size);

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to