diff --git a/media-video/vlc/patches/vlc-2.2.8.patchset b/media-video/vlc/patches/vlc-2.2.8.patchset index 6061ef610..0036ae361 100644 --- a/media-video/vlc/patches/vlc-2.2.8.patchset +++ b/media-video/vlc/patches/vlc-2.2.8.patchset @@ -1,4 +1,4 @@ -From c03ab8b4caa1d5314c0a51e4aed3b9cbadafc45b Mon Sep 17 00:00:00 2001 +From 4f1bd749631c9b1cfee90170aa8ae2b225910c2c Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Wed, 23 Aug 2017 16:56:18 +0300 Subject: initial Haiku support @@ -80,7 +80,7 @@ index fb4608c..9c7c085 100644 { if (override) diff --git a/configure.ac b/configure.ac -index 235edf5..1b9c44b 100644 +index b49281c..2ec9809 100644 --- a/configure.ac +++ b/configure.ac @@ -298,11 +298,19 @@ case "${host_os}" in @@ -523,7 +523,7 @@ index e56c976..76b7ef4 100644 return VLC_EGENERIC; #endif diff --git a/src/Makefile.am b/src/Makefile.am -index c45c5dc..1f6397f 100644 +index 4aaf405..b2ead2c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -231,6 +231,9 @@ else @@ -665,17 +665,17 @@ index ea1b1b9..acdd9b1 100644 #ifdef SOCK_DCCP case SOCK_DCCP: -- -2.13.1 +2.16.4 -From 0e1e8eb3c1d05804281a03306c17b83bee8a3155 Mon Sep 17 00:00:00 2001 +From f8f783594747bb967335b7bf35d7e9a0d2e7140b Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Wed, 23 Aug 2017 16:58:12 +0300 Subject: fix build with ffmpeg 3.x and lua 5.2 diff --git a/configure.ac b/configure.ac -index 1b9c44b..647205b 100644 +index 2ec9809..bbb6ce6 100644 --- a/configure.ac +++ b/configure.ac @@ -1535,7 +1535,7 @@ then @@ -844,10 +844,10 @@ index 1d8f7fa..d9643d0 100644 p_va->get = Get; p_va->release = Release; diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c -index a19e7f6..4d14aae 100644 +index 4c3e9bc..a720fd8 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c -@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, +@@ -236,7 +236,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, p_sys->p_codec = p_codec; p_sys->i_codec_id = i_codec_id; p_sys->psz_namecodec = psz_namecodec; @@ -856,7 +856,7 @@ index a19e7f6..4d14aae 100644 p_sys->b_delayed_open = true; p_sys->p_va = NULL; vlc_sem_init( &p_sys->sem_mt, 0 ); -@@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, +@@ -448,7 +448,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, if( ffmpeg_OpenCodec( p_dec ) < 0 ) { msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec ); @@ -865,7 +865,7 @@ index a19e7f6..4d14aae 100644 vlc_sem_destroy( &p_sys->sem_mt ); free( p_sys ); return VLC_EGENERIC; -@@ -847,7 +847,7 @@ void EndVideoDec( decoder_t *p_dec ) +@@ -849,7 +849,7 @@ void EndVideoDec( decoder_t *p_dec ) wait_mt( p_sys ); if( p_sys->p_ff_pic ) @@ -875,10 +875,10 @@ index a19e7f6..4d14aae 100644 if( p_sys->p_va ) vlc_va_Delete( p_sys->p_va ); -- -2.13.1 +2.16.4 -From 9e91e2291edf7ad8810eb64301bbbd4ca57e3b8c Mon Sep 17 00:00:00 2001 +From 8ff84f986f9a180c2e2a84c14d5b6d29e1f9a69b Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Wed, 23 Aug 2017 18:44:51 +0300 Subject: backport static assert fix from vlc 3.0 @@ -906,5 +906,408 @@ index 47b566e..9ee135f 100644 #ifdef ATTRIBUTE_ALIGNED_MAX # define ATTR_ALIGN(align) __attribute__ ((__aligned__ ((ATTRIBUTE_ALIGNED_MAX < align) ? ATTRIBUTE_ALIGNED_MAX : align))) -- -2.13.1 +2.16.4 + + +From 2957d5ed6e13d52863ac9b2835f8beb93c7bb3f4 Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Thu, 30 Aug 2018 12:54:55 +0300 +Subject: Fix build on Qt 5.11 + + +diff --git a/modules/gui/qt4/actions_manager.cpp b/modules/gui/qt4/actions_manager.cpp +index a88c972..2b7ce9d 100644 +--- a/modules/gui/qt4/actions_manager.cpp ++++ b/modules/gui/qt4/actions_manager.cpp +@@ -27,6 +27,8 @@ + + #include "qt4.hpp" + ++#include ++ + #include + #include + +diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp +index eca0a45..3ef7880 100644 +--- a/modules/gui/qt4/components/simple_preferences.cpp ++++ b/modules/gui/qt4/components/simple_preferences.cpp +@@ -33,6 +33,7 @@ + #include + #include + ++#include + #include + #include + #include +-- +2.16.4 + + +From 54b75e39cd706655e1e987658944d6a211789d6a Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Thu, 30 Aug 2018 12:56:59 +0300 +Subject: Fix build with ffmpeg 4.0 + + +diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h +index 3c66a1e..b977ef5 100644 +--- a/modules/codec/avcodec/avcommon_compat.h ++++ b/modules/codec/avcodec/avcommon_compat.h +@@ -47,6 +47,45 @@ + # define AV_SAMPLE_FMT_S32 SAMPLE_FMT_S32 + # define AV_SAMPLE_FMT_FLT SAMPLE_FMT_FLT + # define AV_SAMPLE_FMT_DBL SAMPLE_FMT_DBL ++#ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT ++# define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT ++#endif ++#ifndef AV_CODEC_FLAG_GRAY ++# define AV_CODEC_FLAG_GRAY CODEC_FLAG_GRAY ++#endif ++#ifndef AV_CODEC_FLAG_DR1 ++# define AV_CODEC_FLAG_DR1 CODEC_FLAG_DR1 ++#endif ++#ifndef AV_CODEC_FLAG_DELAY ++# define AV_CODEC_FLAG_DELAY CODEC_FLAG_DELAY ++#endif ++#ifndef AV_CODEC_FLAG2_FAST ++# define AV_CODEC_FLAG2_FAST CODEC_FLAG2_FAST ++#endif ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_DCT ++# define AV_CODEC_FLAG_INTERLACED_DCT CODEC_FLAG_INTERLACED_DCT ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_ME ++# define AV_CODEC_FLAG_INTERLACED_ME CODEC_FLAG_INTERLACED_ME ++#endif ++#ifndef AV_CODEC_FLAG_GLOBAL_HEADER ++# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#endif ++#ifndef AV_CODEC_FLAG_LOW_DELAY ++# define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY ++#endif ++#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME ++# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME ++#endif ++#ifndef AV_INPUT_BUFFER_MIN_SIZE ++# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE ++#endif ++#ifndef FF_MAX_B_FRAMES ++# define FF_MAX_B_FRAMES 16 // FIXME: remove this ++#endif + + #ifndef AV_CH_FRONT_LEFT + # define AV_CH_FRONT_LEFT CH_FRONT_LEFT +@@ -479,6 +518,46 @@ enum { + # define err_recognition error_recognition + #endif + ++#ifndef AV_CODEC_FLAG_OUTPUT_CORRUPT ++# define AV_CODEC_FLAG_OUTPUT_CORRUPT CODEC_FLAG_OUTPUT_CORRUPT ++#endif ++#ifndef AV_CODEC_FLAG_GRAY ++# define AV_CODEC_FLAG_GRAY CODEC_FLAG_GRAY ++#endif ++#ifndef AV_CODEC_FLAG_DR1 ++# define AV_CODEC_FLAG_DR1 CODEC_FLAG_DR1 ++#endif ++#ifndef AV_CODEC_FLAG_DELAY ++# define AV_CODEC_FLAG_DELAY CODEC_FLAG_DELAY ++#endif ++#ifndef AV_CODEC_FLAG2_FAST ++# define AV_CODEC_FLAG2_FAST CODEC_FLAG2_FAST ++#endif ++#ifndef FF_INPUT_BUFFER_PADDING_SIZE ++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_DCT ++# define AV_CODEC_FLAG_INTERLACED_DCT CODEC_FLAG_INTERLACED_DCT ++#endif ++#ifndef AV_CODEC_FLAG_INTERLACED_ME ++# define AV_CODEC_FLAG_INTERLACED_ME CODEC_FLAG_INTERLACED_ME ++#endif ++#ifndef AV_CODEC_FLAG_GLOBAL_HEADER ++# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER ++#endif ++#ifndef AV_CODEC_FLAG_LOW_DELAY ++# define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY ++#endif ++#ifndef AV_CODEC_CAP_SMALL_LAST_FRAME ++# define AV_CODEC_CAP_SMALL_LAST_FRAME CODEC_CAP_SMALL_LAST_FRAME ++#endif ++#ifndef AV_INPUT_BUFFER_MIN_SIZE ++# define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE ++#endif ++#ifndef FF_MAX_B_FRAMES ++# define FF_MAX_B_FRAMES 16 // FIXME: remove this ++#endif ++ + #endif /* HAVE_LIBAVCODEC_AVCODEC_H */ + + #ifdef HAVE_LIBAVUTIL_AVUTIL_H +diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c +index 9020576..5016226 100644 +--- a/modules/codec/avcodec/encoder.c ++++ b/modules/codec/avcodec/encoder.c +@@ -284,6 +284,24 @@ static void probe_video_frame_rate( encoder_t *p_enc, AVCodecContext *p_context, + msg_Dbg( p_enc, "Time base set to %d/%d", p_context->time_base.num, p_context->time_base.den ); + } + ++static void add_av_option_int( encoder_t *p_enc, AVDictionary** pp_dict, const char* psz_name, int i_value ) ++{ ++ char buff[32]; ++ if ( snprintf( buff, sizeof(buff), "%d", i_value ) < 0 ) ++ return; ++ if( av_dict_set( pp_dict, psz_name, buff, 0 ) < 0 ) ++ msg_Warn( p_enc, "Failed to set encoder option %s", psz_name ); ++} ++ ++static void add_av_option_float( encoder_t *p_enc, AVDictionary** pp_dict, const char* psz_name, float f_value ) ++{ ++ char buff[128]; ++ if ( snprintf( buff, sizeof(buff), "%f", f_value ) < 0 ) ++ return; ++ if( av_dict_set( pp_dict, psz_name, buff, 0 ) < 0 ) ++ msg_Warn( p_enc, "Failed to set encoder option %s", psz_name ); ++} ++ + int OpenEncoder( vlc_object_t *p_this ) + { + encoder_t *p_enc = (encoder_t *)p_this; +@@ -492,6 +510,7 @@ int OpenEncoder( vlc_object_t *p_this ) + } + } + free( psz_val ); ++ AVDictionary *options = NULL; + + if( p_enc->fmt_in.i_cat == VIDEO_ES ) + { +@@ -521,7 +540,7 @@ int OpenEncoder( vlc_object_t *p_this ) + p_context->lumi_masking = p_sys->f_lumi_masking; + p_context->dark_masking = p_sys->f_dark_masking; + p_context->p_masking = p_sys->f_p_masking; +- p_context->border_masking = p_sys->f_border_masking; ++ add_av_option_float( p_enc, &options, "border_mask", p_sys->f_border_masking ); + #if (LIBAVCODEC_VERSION_MAJOR < 55) + p_context->luma_elim_threshold = p_sys->i_luma_elim; + p_context->chroma_elim_threshold = p_sys->i_chroma_elim; +@@ -535,7 +554,7 @@ int OpenEncoder( vlc_object_t *p_this ) + if( !p_context->max_b_frames && + ( p_enc->fmt_out.i_codec == VLC_CODEC_MPGV || + p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ) ) +- p_context->flags |= CODEC_FLAG_LOW_DELAY; ++ p_context->flags |= AV_CODEC_FLAG_LOW_DELAY; + + av_reduce( &p_context->sample_aspect_ratio.num, + &p_context->sample_aspect_ratio.den, +@@ -593,16 +612,16 @@ int OpenEncoder( vlc_object_t *p_this ) + } + else + { +- p_context->flags |= CODEC_FLAG_INTERLACED_DCT; ++ p_context->flags |= AV_CODEC_FLAG_INTERLACED_DCT; + if ( p_sys->b_interlace_me ) +- p_context->flags |= CODEC_FLAG_INTERLACED_ME; ++ p_context->flags |= AV_CODEC_FLAG_INTERLACED_ME; + } + } + + p_context->trellis = p_sys->b_trellis; + + if ( p_sys->i_qmin > 0 && p_sys->i_qmin == p_sys->i_qmax ) +- p_context->flags |= CODEC_FLAG_QSCALE; ++ p_context->flags |= AV_CODEC_FLAG_QSCALE; + /* These codecs cause libavcodec to exit if thread_count is > 1. + See libavcodec/mpegvideo_enc.c:MPV_encode_init and + libavcodec/svq3.c , WMV2 calls MPV_encode_init also. +@@ -638,12 +657,14 @@ int OpenEncoder( vlc_object_t *p_this ) + if( p_sys->i_qmin > 0 ) + { + p_context->qmin = p_sys->i_qmin; +- p_context->mb_lmin = p_context->lmin = p_sys->i_qmin * FF_QP2LAMBDA; ++ p_context->mb_lmin = p_sys->i_qmin * FF_QP2LAMBDA; ++ add_av_option_int( p_enc, &options, "lmin", p_context->mb_lmin); + } + if( p_sys->i_qmax > 0 ) + { + p_context->qmax = p_sys->i_qmax; +- p_context->mb_lmax = p_context->lmax = p_sys->i_qmax * FF_QP2LAMBDA; ++ p_context->mb_lmax = p_sys->i_qmax * FF_QP2LAMBDA; ++ add_av_option_int( p_enc, &options, "lmax", p_context->mb_lmax); + } + p_context->max_qdiff = 3; + +@@ -651,12 +672,12 @@ int OpenEncoder( vlc_object_t *p_this ) + + if( p_sys->i_quality && !p_enc->fmt_out.i_bitrate ) + { +- p_context->flags |= CODEC_FLAG_QSCALE; ++ p_context->flags |= AV_CODEC_FLAG_QSCALE; + p_context->global_quality = p_sys->i_quality; + } + else + { +- p_context->rc_qsquish = 1.0; ++ av_dict_set(&options, "qsquish", "1.0", 0); + /* Default to 1/2 second buffer for given bitrate unless defined otherwise*/ + if( !p_sys->i_rc_buffer_size ) + { +@@ -670,7 +691,7 @@ int OpenEncoder( vlc_object_t *p_this ) + /* This is from ffmpeg's ffmpeg.c : */ + p_context->rc_initial_buffer_occupancy + = p_sys->i_rc_buffer_size * 3/4; +- p_context->rc_buffer_aggressivity = p_sys->f_rc_buffer_aggressivity; ++ add_av_option_float( p_enc, &options, "rc_buffer_aggressivity", p_sys->f_rc_buffer_aggressivity ); + } + } + else if( p_enc->fmt_in.i_cat == AUDIO_ES ) +@@ -807,20 +828,23 @@ int OpenEncoder( vlc_object_t *p_this ) + if( !var_GetInteger( p_enc, ENC_CFG_PREFIX "qmin" ) ) + { + p_context->qmin = 10; +- p_context->mb_lmin = p_context->lmin = 10 * FF_QP2LAMBDA; ++ p_context->mb_lmin = 10 * FF_QP2LAMBDA; ++ add_av_option_int( p_enc, &options, "lmin", p_context->mb_lmin ); + } + + if( !var_GetInteger( p_enc, ENC_CFG_PREFIX "qmax" ) ) + { + p_context->qmax = 42; +- p_context->mb_lmax = p_context->lmax = 42 * FF_QP2LAMBDA; ++ p_context->mb_lmax = 42 * FF_QP2LAMBDA; ++ add_av_option_int( p_enc, &options, "lmax", p_context->mb_lmax ); + } + + } else { + if( !var_GetInteger( p_enc, ENC_CFG_PREFIX "qmin" ) ) + { + p_context->qmin = 1; +- p_context->mb_lmin = p_context->lmin = FF_QP2LAMBDA; ++ p_context->mb_lmin = FF_QP2LAMBDA; ++ add_av_option_int( p_enc, &options, "lmin", p_context->mb_lmin ); + } + } + +@@ -845,7 +869,7 @@ int OpenEncoder( vlc_object_t *p_this ) + /* Make sure we get extradata filled by the encoder */ + p_context->extradata_size = 0; + p_context->extradata = NULL; +- p_context->flags |= CODEC_FLAG_GLOBAL_HEADER; ++ p_context->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; + + if( p_enc->i_threads >= 1) + p_context->thread_count = p_enc->i_threads; +@@ -854,7 +878,6 @@ int OpenEncoder( vlc_object_t *p_this ) + + int ret; + char *psz_opts = var_InheritString(p_enc, ENC_CFG_PREFIX "options"); +- AVDictionary *options = NULL; + if (psz_opts && *psz_opts) + options = vlc_av_get_options(psz_opts); + free(psz_opts); +@@ -982,7 +1005,7 @@ errmsg: + } + } + +- p_context->flags &= ~CODEC_FLAG_GLOBAL_HEADER; ++ p_context->flags &= ~AV_CODEC_FLAG_GLOBAL_HEADER; + + if( p_enc->fmt_in.i_cat == AUDIO_ES ) + { +@@ -992,7 +1015,7 @@ errmsg: + p_sys->i_sample_bytes = (p_enc->fmt_in.audio.i_bitspersample / 8); + p_sys->i_frame_size = p_context->frame_size > 1 ? + p_context->frame_size : +- FF_MIN_BUFFER_SIZE; ++ AV_INPUT_BUFFER_MIN_SIZE; + p_sys->i_buffer_out = av_samples_get_buffer_size(NULL, + p_sys->p_context->channels, p_sys->i_frame_size, + p_sys->p_context->sample_fmt, DEFAULT_ALIGN); +@@ -1359,7 +1382,7 @@ static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int + } + + if(unlikely( ( (leftover + buffer_delay) < p_sys->i_buffer_out ) && +- !(p_sys->p_codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME ))) ++ !(p_sys->p_codec->capabilities & AV_CODEC_CAP_SMALL_LAST_FRAME ))) + { + msg_Dbg( p_enc, "No small last frame support, padding"); + size_t padding_size = p_sys->i_buffer_out - (leftover+buffer_delay); +diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c +index a720fd8..975ab5d 100644 +--- a/modules/codec/avcodec/video.c ++++ b/modules/codec/avcodec/video.c +@@ -251,11 +251,11 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, + var_InheritInteger( p_dec, "avcodec-error-resilience" ); + + if( var_CreateGetBool( p_dec, "grayscale" ) ) +- p_sys->p_context->flags |= CODEC_FLAG_GRAY; ++ p_sys->p_context->flags |= AV_CODEC_FLAG_GRAY; + + /* ***** Output always the frames ***** */ + #if LIBAVCODEC_VERSION_CHECK(55, 23, 1, 40, 101) +- p_sys->p_context->flags |= CODEC_FLAG_OUTPUT_CORRUPT; ++ p_sys->p_context->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT; + #endif + + i_val = var_CreateGetInteger( p_dec, "avcodec-vismv" ); +@@ -268,7 +268,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, + else if( i_val == 1 ) p_sys->p_context->skip_loop_filter = AVDISCARD_NONREF; + + if( var_CreateGetBool( p_dec, "avcodec-fast" ) ) +- p_sys->p_context->flags2 |= CODEC_FLAG2_FAST; ++ p_sys->p_context->flags2 |= AV_CODEC_FLAG2_FAST; + + /* ***** libavcodec frame skipping ***** */ + p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" ); +@@ -295,7 +295,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, + p_sys->b_direct_rendering = false; + p_sys->i_direct_rendering_used = -1; + if( var_CreateGetBool( p_dec, "avcodec-dr" ) && +- (p_sys->p_codec->capabilities & CODEC_CAP_DR1) && ++ (p_sys->p_codec->capabilities & AV_CODEC_CAP_DR1) && + /* No idea why ... but this fixes flickering on some TSCC streams */ + p_sys->i_codec_id != AV_CODEC_ID_TSCC && p_sys->i_codec_id != AV_CODEC_ID_CSCD && + p_sys->i_codec_id != AV_CODEC_ID_CINEPAK && +@@ -308,16 +308,9 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, + + /* libavcodec doesn't properly release old pictures when frames are skipped */ + //if( p_sys->b_hurry_up ) p_sys->b_direct_rendering = false; +- if( p_sys->b_direct_rendering ) +- { +- msg_Dbg( p_dec, "trying to use direct rendering" ); +- p_sys->p_context->flags |= CODEC_FLAG_EMU_EDGE; +- } +- else +- { +- msg_Dbg( p_dec, "direct rendering is disabled" ); +- } +- ++#if !LIBAVCODEC_VERSION_CHECK(55, 32, 1, 48, 102) ++ p_sys->p_context->flags |= CODEC_FLAG_EMU_EDGE; ++#endif + p_sys->p_context->get_format = ffmpeg_GetFormat; + /* Always use our get_buffer wrapper so we can calculate the + * PTS correctly */ +@@ -484,7 +477,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) + } + + p_block = *pp_block; +- if(!p_block && !(p_sys->p_codec->capabilities & CODEC_CAP_DELAY) ) ++ if(!p_block && !(p_sys->p_codec->capabilities & AV_CODEC_CAP_DELAY) ) + return NULL; + + if( p_sys->b_delayed_open ) +@@ -621,7 +614,7 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) + } + else + { +- /* Return delayed frames if codec has CODEC_CAP_DELAY */ ++ /* Return delayed frames if codec has AV_CODEC_CAP_DELAY */ + pkt.data = NULL; + pkt.size = 0; + } +-- +2.16.4 diff --git a/media-video/vlc/vlc-2.2.8.recipe b/media-video/vlc/vlc-2.2.8.recipe index b81526256..50fb56b16 100644 --- a/media-video/vlc/vlc-2.2.8.recipe +++ b/media-video/vlc/vlc-2.2.8.recipe @@ -105,10 +105,10 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:liba52$secondaryArchSuffix - devel:libass$secondaryArchSuffix - devel:libavcodec$secondaryArchSuffix >= 57 - devel:libavformat$secondaryArchSuffix >= 57 - devel:libavutil$secondaryArchSuffix >= 55 + devel:libass$secondaryArchSuffix # crashes vlc-cache-gen + devel:libavcodec$secondaryArchSuffix >= 58 + devel:libavformat$secondaryArchSuffix >= 58 + devel:libavutil$secondaryArchSuffix >= 56 devel:libbluray$secondaryArchSuffix devel:libcaca$secondaryArchSuffix devel:libcddb$secondaryArchSuffix @@ -121,7 +121,7 @@ BUILD_REQUIRES=" devel:libenca$secondaryArchSuffix devel:libfaad$secondaryArchSuffix devel:libflac$secondaryArchSuffix - devel:libfluidsynth$secondaryArchSuffix + devel:libfluidsynth$secondaryArchSuffix # crashes vlc-cache-gen devel:libfontconfig$secondaryArchSuffix devel:libfreetype$secondaryArchSuffix devel:libfribidi$secondaryArchSuffix @@ -156,7 +156,7 @@ BUILD_REQUIRES=" devel:libspeex$secondaryArchSuffix devel:libssh2$secondaryArchSuffix devel:libssl$secondaryArchSuffix - devel:libswscale$secondaryArchSuffix >= 4 + devel:libswscale$secondaryArchSuffix >= 5 devel:libtag$secondaryArchSuffix devel:libtheora$secondaryArchSuffix devel:libtwolame$secondaryArchSuffix @@ -181,6 +181,17 @@ BUILD_PREREQUIRES=" cmd:xargs " +PATCH() +{ + # Remove unnecessary warnings about unimplemented pragmas on gcc for now. + # config.h:798: warning: ignoring #pragma STDC FENV_ACCESS [-Wunknown-pragmas] + # config.h:799: warning: ignoring #pragma STDC FP_CONTRACT [-Wunknown-pragmas] + # doesn't work for some reason + sed -i 's/ifndef __FAST_MATH__/if 0/g' configure.ac || die + + # _FORTIFY_SOURCE is set to 2 by default on Haiku, remove redefine warnings. + sed -i '/_FORTIFY_SOURCE.*, 2,/d' configure.ac || die +} BUILD() { autoreconf