[vlc-devel] commit: Proper CODEC_TYPE_ATTACHMENT check. (Laurent Aimar )
git version control
git at videolan.org
Sat Jul 12 00:34:37 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jul 12 00:36:32 2008 +0200| [2a07de63333c8e262f23d25ce1e9dddf37d3355c]
Proper CODEC_TYPE_ATTACHMENT check.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2a07de63333c8e262f23d25ce1e9dddf37d3355c
---
modules/demux/avformat/demux.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index da323ee..e3254b2 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -51,6 +51,10 @@
/* Version checking */
#if defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_AVFORMAT_H)
+#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(50<<8)+0) )
+# define HAVE_FFMPEG_CODEC_ATTACHMENT 1
+#endif
+
/*****************************************************************************
* demux_sys_t: demux descriptor
*****************************************************************************/
@@ -244,9 +248,10 @@ int OpenDemux( vlc_object_t *p_this )
es_format_Init( &fmt, UNKNOWN_ES, 0 );
if( cc->codec_type == CODEC_TYPE_DATA )
psz_type = "data";
+#ifdef HAVE_FFMPEG_CODEC_ATTACHMENT
else if( cc->codec_type == CODEC_TYPE_ATTACHMENT )
psz_type = "attachment";
-
+#endif
msg_Warn( p_demux, "unsupported track type in ffmpeg demux" );
break;
}
More information about the vlc-devel
mailing list