Commit a8c4fb9f authored by Ghislain MARY's avatar Ghislain MARY

Fix bug 0002530: Do not build h264dec.c in mediastreamer if ffmpeg has no h264 support built-in.

parent ba9cb7b1
......@@ -448,5 +448,9 @@ MSFilterDesc ms_h264_dec_desc={
#endif
MS_FILTER_DESC_EXPORT(ms_h264_dec_desc)
void __register_ffmpeg_h264_decoder_if_possible(MSFactory *obj) {
ms_ffmpeg_check_init();
if (avcodec_find_decoder(CODEC_ID_H264) && HAVE_NON_FREE_CODECS) {
ms_factory_register_filter(obj, &ms_h264_dec_desc);
}
}
......@@ -40,6 +40,7 @@ extern "C"{
#endif
extern void __register_ffmpeg_encoders_if_possible(MSFactory *factory);
extern void __register_ffmpeg_h264_decoder_if_possible(MSFactory *factory);
extern void ms_ffmpeg_check_init();
extern bool_t libmsandroiddisplay_init(MSFactory *factory);
extern void libmsandroiddisplaybad_init(MSFactory *factory);
......@@ -302,6 +303,7 @@ void ms_factory_init_voip(MSFactory *obj){
#if defined(VIDEO_ENABLED) && defined(MS2_FILTERS) && !defined(NO_FFMPEG) && defined(HAVE_LIBAVCODEC_AVCODEC_H)
ms_ffmpeg_check_init();
__register_ffmpeg_encoders_if_possible(obj);
__register_ffmpeg_h264_decoder_if_possible(obj);
#endif
#if defined(ANDROID) && defined (VIDEO_ENABLED)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment