[vlc-commits] contrib: ogg: update to 1.3.4
vlc | branch: master | Tristan Matthews | Tue Sep 3 12:15:29 2019 -0400| [8c7a70b62f200a612ab0aa2f53e2fde090fddc4a] | committer: Tristan Matthews contrib: ogg: update to 1.3.4 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c7a70b62f200a612ab0aa2f53e2fde090fddc4a --- contrib/src/ogg/SHA512SUMS | 2 +- contrib/src/ogg/rules.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/src/ogg/SHA512SUMS b/contrib/src/ogg/SHA512SUMS index 617c820c4d..3fef21e588 100644 --- a/contrib/src/ogg/SHA512SUMS +++ b/contrib/src/ogg/SHA512SUMS @@ -1 +1 @@ -37d8e4329bf7a997a95d84a55c325a5a893ec84bb4d5b7ea638e5cb13201a0619e71ecd9710a8371def69f092c62dcc59ec0a607db246028ee8a62678386260b libogg-1.3.3.tar.xz +09ffb72c3cbde5c05140f5879bd457106ed4070bd7aa5ea7720cf8910167f1d0fa6312f1f71625d51f21e3033219da858e1a8a2701bfd768b35061f7586f976c libogg-1.3.4.tar.xz diff --git a/contrib/src/ogg/rules.mak b/contrib/src/ogg/rules.mak index e24e3ab024..91cb6b80de 100644 --- a/contrib/src/ogg/rules.mak +++ b/contrib/src/ogg/rules.mak @@ -1,6 +1,6 @@ # libogg -OGG_VERSION := 1.3.3 +OGG_VERSION := 1.3.4 OGG_URL := http://downloads.xiph.org/releases/ogg/libogg-$(OGG_VERSION).tar.xz #OGG_CVSROOT := :pserver:anon...@xiph.org:/usr/local/cvsroot ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: update to flac 1.3.3
vlc | branch: master | Tristan Matthews | Mon Aug 26 11:30:35 2019 -0400| [9ebdec7ea94b4cf6fb2dbad3228da1363cda1e21] | committer: Tristan Matthews contrib: update to flac 1.3.3 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ebdec7ea94b4cf6fb2dbad3228da1363cda1e21 --- contrib/src/flac/SHA512SUMS| 2 +- contrib/src/flac/dont-force-msvcrt-version.patch | 9 ++-- contrib/src/flac/no-createfilea.patch | 55 ++ .../remove_blocking_code_useless_flaclib.patch | 12 ++--- contrib/src/flac/rules.mak | 2 +- 5 files changed, 58 insertions(+), 22 deletions(-) diff --git a/contrib/src/flac/SHA512SUMS b/contrib/src/flac/SHA512SUMS index 24b75c704c..6c1f8b2d6d 100644 --- a/contrib/src/flac/SHA512SUMS +++ b/contrib/src/flac/SHA512SUMS @@ -1 +1 @@ -63910e8ebbe508316d446ffc9eb6d02efbd5f47d29d2ea7864da9371843c8e671854db6e89ba043fe08aef1845b8ece70db80f1cce853f591ca30d56ef7c3a15 flac-1.3.2.tar.xz +d6417e14fab0c41b2df369e5e39ce62a5f588e491af4d465b0162f74e171e5549b2f061867f344bfbf8aaccd246bf5f2acd697e532a2c7901c920c69429b1a28 flac-1.3.3.tar.xz diff --git a/contrib/src/flac/dont-force-msvcrt-version.patch b/contrib/src/flac/dont-force-msvcrt-version.patch index b233bd3b61..d473347c07 100644 --- a/contrib/src/flac/dont-force-msvcrt-version.patch +++ b/contrib/src/flac/dont-force-msvcrt-version.patch @@ -1,10 +1,9 @@ -diff -urN flac-orig/configure.ac flac/configure.ac flac-orig/configure.ac 2017-01-01 03:46:35.224989057 +0200 -+++ flac/configure.ac 2018-02-26 00:37:22.876134887 +0200 -@@ -178,7 +178,6 @@ +--- flac-orig/configure.ac 2019-08-26 11:13:17.604801738 -0400 flac/configure.ac 2019-08-26 11:13:46.624689160 -0400 +@@ -208,7 +208,6 @@ os_is_windows=no case "$host" in - *-*-cygwin|*mingw*) + *mingw*) - CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS" os_is_windows=yes ;; diff --git a/contrib/src/flac/no-createfilea.patch b/contrib/src/flac/no-createfilea.patch index 4cefa2cbb1..b66f96d8e8 100644 --- a/contrib/src/flac/no-createfilea.patch +++ b/contrib/src/flac/no-createfilea.patch @@ -1,17 +1,20 @@ flac/src/libFLAC/windows_unicode_filenames.c.orig 2017-01-05 16:36:45.696358168 +0100 -+++ flac/src/libFLAC/windows_unicode_filenames.c 2017-01-05 17:03:41.052478210 +0100 -@@ -35,6 +35,7 @@ +--- flac-orig/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:13:17.600801754 -0400 flac/src/share/win_utf8_io/win_utf8_io.c 2019-08-26 11:20:27.895132487 -0400 +@@ -34,8 +34,10 @@ + #endif - #include + #include ++#include + #include "share/win_utf8_io.h" #include "share/windows_unicode_filenames.h" +#include - /* convert UTF-8 back to WCHAR. Caller is responsible for freeing memory */ - static wchar_t *wchar_from_utf8(const char *str) -@@ -186,7 +187,11 @@ - HANDLE WINAPI flac_internal_CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) + #define UTF8_BUFFER_SIZE 32768 + +@@ -153,7 +155,11 @@ + HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) { - if (!utf8_filenames) { + if (!flac_internal_get_utf8_filenames()) { +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); +#else @@ -20,3 +23,37 @@ } else { wchar_t *wname; HANDLE handle = INVALID_HANDLE_VALUE; +@@ -182,11 +188,13 @@ + int win_get_console_width(void) + { + int width = 80; ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) + CONSOLE_SCREEN_BUFFER_INFO csbi; + HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); + if(hOut != INVALID_HANDLE_VALUE && hOut != NULL) + if (GetConsoleScreenBufferInfo(hOut, ) != 0) + width = csbi.dwSize.X; ++#endif + return width; + } + +@@ -194,6 +202,11 @@ + + static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + { ++#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++ (void)stream; ++ OutputDebugStringW(text); ++ return len; ++#else + DWORD out; + int ret; + +@@ -220,6 +233,7 @@ + if (ret < 0) + return ret; + return len; ++#endif + } + + int printf_utf8(const char *format, ...) diff --git a/contrib/src/flac/remove_blocking_code_useless_flaclib.patch b/contrib/src/flac/remove_blocking_code_useless_flaclib.patch index 620773a0eb..6a302756ed 100644 --- a/contrib/src/flac/remove_blocking_code_useless_flaclib.patch +++
[vlc-commits] packetizer: flac: don't increment invalid date (fix #22699)
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Tue Sep 3 15:28:57 2019 +0200| [85d7342f0065a70256b146ec1ab5f357f6745e95] | committer: Francois Cartegnie packetizer: flac: don't increment invalid date (fix #22699) vlc-4.0 prevents this in date_Increment() > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=85d7342f0065a70256b146ec1ab5f357f6745e95 --- modules/packetizer/flac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c index a1a2b5fea4..40251041c3 100644 --- a/modules/packetizer/flac.c +++ b/modules/packetizer/flac.c @@ -505,9 +505,10 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block) } else p_sys->p_buf = NULL; + +date_Increment( _sys->pts, p_sys->headerinfo.i_frame_length ); } -date_Increment( _sys->pts, p_sys->headerinfo.i_frame_length ); if( out ) out->i_length = date_Get( _sys->pts ) - out->i_pts; else ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] vout: spu: prerender text
vlc | branch: master | Francois Cartegnie | Thu Jul 25 15:58:33 2019 +0200| [f501c7dc21215b840c106842e8ed54479c047104] | committer: Francois Cartegnie vout: spu: prerender text Should avoid frame delay in most cases. Will still re-render at blending time if dst has changed in between. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f501c7dc21215b840c106842e8ed54479c047104 --- src/video_output/vout_subpictures.c | 406 +--- 1 file changed, 332 insertions(+), 74 deletions(-) diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 53daf00827..c2b0d50ace 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -69,6 +69,8 @@ struct spu_channel { }; typedef struct VLC_VECTOR(struct spu_channel) spu_channel_vector; +typedef struct VLC_VECTOR(subpicture_t *) spu_prerender_vector; +#define SPU_CHROMALIST_COUNT 8 struct spu_private_t { vlc_mutex_t lock;/* lock to protect all followings fields */ @@ -78,6 +80,7 @@ struct spu_private_t { int channel; /**< number of subpicture channels registered */ filter_t *text; /**< text renderer module */ +vlc_mutex_t textlock; filter_t *scale_yuvp; /**< scaling module for YUVP */ filter_t *scale;/**< scaling module (all but YUVP) */ bool force_crop; /**< force cropping of subpicture */ @@ -106,12 +109,28 @@ struct spu_private_t { char *filter_chain_update; vlc_mutex_tfilter_chain_lock; filter_chain_t *filter_chain; +/**/ +struct +{ +vlc_thread_tthread; +vlc_mutex_t lock; +vlc_cond_t cond; +vlc_cond_t output_cond; +spu_prerender_vector vector; +subpicture_t *p_processed; +video_format_t fmtsrc; +video_format_t fmtdst; +vlc_fourcc_tchroma_list[SPU_CHROMALIST_COUNT+1]; +} prerender; /* */ vlc_tick_t last_sort_date; vout_thread_t *vout; }; +static void spu_PrerenderSync(spu_private_t *, const subpicture_t *); +static void spu_PrerenderCancel(spu_private_t *, const subpicture_t *); + static void spu_channel_Init(struct spu_channel *channel, size_t id, enum vlc_vout_order order, vlc_clock_t *clock) { @@ -144,11 +163,12 @@ static void spu_channel_DeleteAt(struct spu_channel *channel, size_t index) vlc_vector_remove(>entries, index); } -static void spu_channel_Clean(struct spu_channel *channel) +static void spu_channel_Clean(spu_private_t *sys, struct spu_channel *channel) { for (size_t i = 0; i < channel->entries.size; i++) { assert(channel->entries.data[i].subpic); +spu_PrerenderCancel(sys, channel->entries.data[i].subpic); subpicture_Delete(channel->entries.data[i].subpic); } vlc_vector_destroy(>entries); @@ -295,14 +315,38 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object, static void SpuRenderText(spu_t *spu, subpicture_region_t *region, + int i_original_width, + int i_original_height, const vlc_fourcc_t *chroma_list) { -filter_t *text = spu->p->text; - +spu_private_t *sys = spu->p; +filter_t *text = sys->text; assert(region->fmt.i_chroma == VLC_CODEC_TEXT); -if ( region->p_text ) -text->pf_render(text, region, region, chroma_list); +vlc_mutex_lock(>textlock); +if(text) +{ +// assume rendered text is in sRGB if nothing is set +if (region->fmt.transfer == TRANSFER_FUNC_UNDEF) +region->fmt.transfer = TRANSFER_FUNC_SRGB; +if (region->fmt.primaries == COLOR_PRIMARIES_UNDEF) +region->fmt.primaries = COLOR_PRIMARIES_SRGB; +if (region->fmt.space == COLOR_SPACE_UNDEF) +region->fmt.space = COLOR_SPACE_SRGB; +if (region->fmt.color_range == COLOR_RANGE_UNDEF) +region->fmt.color_range = COLOR_RANGE_FULL; + +/* FIXME aspect ratio ? */ +text->fmt_out.video.i_width = +text->fmt_out.video.i_visible_width = i_original_width; + +text->fmt_out.video.i_height = +text->fmt_out.video.i_visible_height = i_original_height; + +if ( region->p_text ) +text->pf_render(text, region, region, chroma_list); +} +vlc_mutex_unlock(>textlock); } /** @@ -719,6 +763,7 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now, if (is_rejeted) { +spu_PrerenderCancel(sys, current); subpicture_Delete(current); vlc_vector_remove(>entries, index); } @@ -746,6 +791,7 @@ static void SpuRenderRegion(spu_t *spu, const spu_scale_t
[vlc-commits] vout: spu: swap original/converted time
vlc | branch: master | Francois Cartegnie | Tue Jul 2 18:41:00 2019 +0200| [7fc6183226ec955a2d44c8c75c1c2687f659c22a] | committer: Francois Cartegnie vout: spu: swap original/converted time simplified and allow working with picture without the spu channel queue entry > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fc6183226ec955a2d44c8c75c1c2687f659c22a --- src/video_output/vout_subpictures.c | 83 - 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 23c811e242..53daf00827 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -48,11 +48,11 @@ * Local prototypes */ -/* Hold of subpicture with converted ts */ +/* Hold of subpicture with original ts */ typedef struct { subpicture_t *subpic; -vlc_tick_t start; -vlc_tick_t stop; +vlc_tick_t orgstart; +vlc_tick_t orgstop; bool is_late; enum vlc_vout_order channel_order; } spu_render_entry_t; @@ -124,10 +124,13 @@ static void spu_channel_Init(struct spu_channel *channel, size_t id, vlc_vector_init(>entries); } -static int spu_channel_Push(struct spu_channel *channel, subpicture_t *subpic) +static int spu_channel_Push(struct spu_channel *channel, subpicture_t *subpic, +vlc_tick_t orgstart, vlc_tick_t orgstop) { const spu_render_entry_t entry = { .subpic = subpic, +.orgstart = orgstart, +.orgstop = orgstop, }; return vlc_vector_push(>entries, entry) ? VLC_SUCCESS : VLC_EGENERIC; } @@ -512,7 +515,7 @@ static int SSizeCmp(ssize_t i0, ssize_t i1) * This function compares 2 subpictures using the following properties * (ordered by priority) * 1. absolute positionning - * 2. start time + * 2. start time (display time) * 3. creation order (per channel) * * It can be used by qsort. @@ -529,7 +532,7 @@ static int SpuRenderCmp(const void *s0, const void *s1) r = IntegerCmp(!subpic0->b_absolute, !subpic1->b_absolute); if (!r) -r = IntegerCmp(render_entry0->start, render_entry1->start); +r = IntegerCmp(subpic0->i_start, subpic1->i_start); if (!r) r = SSizeCmp(subpic0->i_channel, subpic1->i_channel); if (!r) @@ -537,7 +540,7 @@ static int SpuRenderCmp(const void *s0, const void *s1) return r; } -static size_t spu_channel_ConvertDates(struct spu_channel *channel, +static size_t spu_channel_UpdateDates(struct spu_channel *channel, vlc_tick_t system_now) { /* Put every spu start and stop ts into the same array to convert them in @@ -551,11 +554,11 @@ static size_t spu_channel_ConvertDates(struct spu_channel *channel, for (size_t index = 0; index < channel->entries.size; index++) { -subpicture_t *current = channel->entries.data[index].subpic; +spu_render_entry_t *current = >entries.data[index]; assert(current); -date_array[index * 2] = current->i_start; -date_array[index * 2 + 1] = current->i_stop; +date_array[index * 2] = current->orgstart; +date_array[index * 2 + 1] = current->orgstop; } /* Convert all spu ts */ @@ -568,8 +571,8 @@ static size_t spu_channel_ConvertDates(struct spu_channel *channel, { spu_render_entry_t *render_entry = >entries.data[index]; -render_entry->start = date_array[index * 2]; -render_entry->stop = date_array[index * 2 + 1]; +render_entry->subpic->i_start = date_array[index * 2]; +render_entry->subpic->i_stop = date_array[index * 2 + 1]; } free(date_array); @@ -593,7 +596,7 @@ spu_render_entry_IsSelected(spu_render_entry_t *render_entry, size_t channel_id, const vlc_tick_t render_date = subpic->b_subtitle ? render_subtitle_date : system_now; -if (render_date && render_date < render_entry->start) +if (render_date && render_date < subpic->i_start) return false; /* Too early, come back next monday */ return true; } @@ -641,7 +644,7 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now, int64_t ephemer_subtitle_order = INT64_MIN; int64_t ephemer_system_order = INT64_MIN; -if (spu_channel_ConvertDates(channel, system_now) == 0) +if (spu_channel_UpdateDates(channel, system_now) == 0) continue; /* Select available pictures */ @@ -660,21 +663,21 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now, vlc_tick_t *ephemer_date_ptr = current->b_subtitle ? _subtitle_date : _osd_date; int64_t *ephemer_order_ptr = current->b_subtitle ? _subtitle_order : _system_order; -if (render_entry->start >= *ephemer_date_ptr) { -*ephemer_date_ptr = render_entry->start; +
[vlc-commits] decoder: use defines for the unset/forced preroll values
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:15:17 2019 +0200| [e5b94b633ab6d2a1c905e61c680a9a25be90b45f] | committer: Steve Lhomme decoder: use defines for the unset/forced preroll values > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5b94b633ab6d2a1c905e61c680a9a25be90b45f --- src/input/decoder.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index ead516f40c..e28b179212 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -109,6 +109,10 @@ struct decoder_owner /* -- Theses variables need locking on read *and* write -- */ /* Preroll */ vlc_tick_t i_preroll_end; + +#define PREROLL_NONEINT64_MIN // vlc_tick_t +#define PREROLL_FORCED INT64_MAX // vlc_tick_t + /* Pause & Rate */ bool reset_out_state; vlc_tick_t pause_date; @@ -773,11 +777,11 @@ static void DecoderWaitUnblock( struct decoder_owner *p_owner ) static inline void DecoderUpdatePreroll( vlc_tick_t *pi_preroll, const block_t *p ) { if( p->i_flags & BLOCK_FLAG_PREROLL ) -*pi_preroll = (vlc_tick_t)INT64_MAX; +*pi_preroll = PREROLL_FORCED; /* Check if we can use the packet for end of preroll */ else if( (p->i_flags & BLOCK_FLAG_DISCONTINUITY) && (p->i_buffer == 0 || (p->i_flags & BLOCK_FLAG_CORRUPTED)) ) -*pi_preroll = (vlc_tick_t)INT64_MAX; +*pi_preroll = PREROLL_FORCED; else if( p->i_dts != VLC_TICK_INVALID ) *pi_preroll = __MIN( *pi_preroll, p->i_dts ); else if( p->i_pts != VLC_TICK_INVALID ) @@ -987,7 +991,7 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture } vlc_mutex_lock( _owner->lock ); -bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN; +bool prerolled = p_owner->i_preroll_end != PREROLL_NONE; if( prerolled && p_owner->i_preroll_end > p_picture->date ) { vlc_mutex_unlock( _owner->lock ); @@ -995,7 +999,7 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture return VLC_SUCCESS; } -p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; +p_owner->i_preroll_end = PREROLL_NONE; vlc_mutex_unlock( _owner->lock ); if( unlikely(prerolled) ) @@ -1119,7 +1123,7 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) } vlc_mutex_lock( _owner->lock ); -bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN; +bool prerolled = p_owner->i_preroll_end != PREROLL_NONE; if( prerolled && p_owner->i_preroll_end > p_audio->i_pts ) { vlc_mutex_unlock( _owner->lock ); @@ -1127,7 +1131,7 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) return VLC_SUCCESS; } -p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; +p_owner->i_preroll_end = PREROLL_NONE; vlc_mutex_unlock( _owner->lock ); if( unlikely(prerolled) ) @@ -1452,7 +1456,7 @@ static void DecoderProcessFlush( struct decoder_owner *p_owner ) } } -p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; +p_owner->i_preroll_end = PREROLL_NONE; vlc_mutex_unlock( _owner->lock ); } @@ -1750,7 +1754,7 @@ static struct decoder_owner * CreateDecoder( vlc_object_t *p_parent, p_dec = _owner->dec; p_owner->p_clock = p_clock; -p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; +p_owner->i_preroll_end = PREROLL_NONE; p_owner->p_resource = p_resource; p_owner->cbs = cbs; p_owner->cbs_userdata = cbs_userdata; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: pass decoder_owner to internal calls instead of decoder_t
vlc | branch: master | Steve Lhomme | Tue Aug 27 08:24:52 2019 +0200| [a46508d9dd8eeccc8e8fa778b331f6c027db84c7] | committer: Steve Lhomme decoder: pass decoder_owner to internal calls instead of decoder_t No need to call container_of() when we don't need to. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a46508d9dd8eeccc8e8fa778b331f6c027db84c7 --- src/input/decoder.c | 158 1 file changed, 73 insertions(+), 85 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 782dc0a422..1e21698c5c 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -197,11 +197,11 @@ static int LoadDecoder( decoder_t *p_dec, bool b_packetizer, return 0; } -static int ReloadDecoder( decoder_t *p_dec, bool b_packetizer, +static int ReloadDecoder( struct decoder_owner *p_owner, bool b_packetizer, const es_format_t *restrict p_fmt, enum reload reload ) { /* Copy p_fmt since it can be destroyed by decoder_Clean */ -struct decoder_owner *p_owner = dec_get_owner( p_dec ); +decoder_t *p_dec = _owner->dec; es_format_t fmt_in; if( es_format_Copy( _in, p_fmt ) != VLC_SUCCESS ) { @@ -238,9 +238,9 @@ static int ReloadDecoder( decoder_t *p_dec, bool b_packetizer, return VLC_SUCCESS; } -static void DecoderUpdateFormatLocked( decoder_t *p_dec ) +static void DecoderUpdateFormatLocked( struct decoder_owner *p_owner ) { -struct decoder_owner *p_owner = dec_get_owner( p_dec ); +decoder_t *p_dec = _owner->dec; vlc_mutex_assert( _owner->lock ); @@ -358,7 +358,7 @@ static int aout_update_format( decoder_t *p_dec ) vlc_mutex_lock( _owner->lock ); p_owner->p_aout = p_aout; -DecoderUpdateFormatLocked( p_dec ); +DecoderUpdateFormatLocked( p_owner ); aout_FormatPrepare( _owner->fmt.audio ); vlc_mutex_unlock( _owner->lock ); @@ -553,7 +553,7 @@ static int vout_update_format( decoder_t *p_dec ) vlc_mutex_lock( _owner->lock ); p_owner->p_vout = p_vout; -DecoderUpdateFormatLocked( p_dec ); +DecoderUpdateFormatLocked( p_owner ); p_owner->fmt.video.i_chroma = p_dec->fmt_out.i_codec; vlc_mutex_unlock( _owner->lock ); @@ -572,7 +572,7 @@ static int vout_update_format( decoder_t *p_dec ) { /* the format has changed but we don't need a new vout */ vlc_mutex_lock( _owner->lock ); -DecoderUpdateFormatLocked( p_dec ); +DecoderUpdateFormatLocked( p_owner ); vlc_mutex_unlock( _owner->lock ); } return 0; @@ -741,9 +741,8 @@ block_t *decoder_NewAudioBuffer( decoder_t *dec, int samples ) return block; } -static void RequestReload( decoder_t * p_dec ) +static void RequestReload( struct decoder_owner *p_owner ) { -struct decoder_owner *p_owner = dec_get_owner( p_dec ); /* Don't override reload if it's RELOAD_DECODER_AOUT */ int expected = RELOAD_NO_REQUEST; atomic_compare_exchange_strong( _owner->reload, , RELOAD_DECODER ); @@ -759,10 +758,8 @@ void decoder_AbortPictures( decoder_t *p_dec, bool b_abort ) vlc_mutex_unlock( _owner->lock ); } -static void DecoderWaitUnblock( decoder_t *p_dec ) +static void DecoderWaitUnblock( struct decoder_owner *p_owner ) { -struct decoder_owner *p_owner = dec_get_owner( p_dec ); - vlc_mutex_assert( _owner->lock ); for( ;; ) @@ -788,10 +785,8 @@ static inline void DecoderUpdatePreroll( vlc_tick_t *pi_preroll, const block_t * } #ifdef ENABLE_SOUT -static int DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block ) +static int DecoderPlaySout( struct decoder_owner *p_owner, block_t *p_sout_block ) { -struct decoder_owner *p_owner = dec_get_owner( p_dec ); - assert( !p_sout_block->p_next ); vlc_mutex_lock( _owner->lock ); @@ -802,7 +797,7 @@ static int DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block ) vlc_cond_signal( _owner->wait_acknowledge ); } -DecoderWaitUnblock( p_dec ); +DecoderWaitUnblock( p_owner ); vlc_mutex_unlock( _owner->lock ); @@ -812,9 +807,9 @@ static int DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block ) /* This function process a block for sout */ -static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block ) +static void DecoderProcessSout( struct decoder_owner *p_owner, block_t *p_block ) { -struct decoder_owner *p_owner = dec_get_owner( p_dec ); +decoder_t *p_dec = _owner->dec; block_t *p_sout_block; block_t **pp_block = p_block ? _block : NULL; @@ -824,7 +819,7 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block ) if( p_owner->p_sout_input == NULL ) { vlc_mutex_lock( _owner->lock ); -DecoderUpdateFormatLocked( p_dec ); +DecoderUpdateFormatLocked( p_owner ); p_owner->fmt.i_group = p_dec->fmt_in.i_group;
[vlc-commits] decoder: simplify how we report lost audio blocks
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:22:04 2019 +0200| [97f0fc99ac700b9517f4ec557c62a2af43ac97fd] | committer: Steve Lhomme decoder: simplify how we report lost audio blocks No need for pointers. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=97f0fc99ac700b9517f4ec557c62a2af43ac97fd --- src/input/decoder.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 1e9134cde0..0590f1d65b 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1118,8 +1118,7 @@ static void DecoderQueueThumbnail( decoder_t *p_dec, picture_t *p_pic ) } -static void DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio, - unsigned *restrict pi_lost_sum ) +static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) { decoder_t *p_dec = _owner->dec; bool prerolled; @@ -1131,7 +1130,7 @@ static void DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio, { vlc_mutex_unlock( _owner->lock ); block_Release( p_audio ); -return; +return VLC_SUCCESS; } prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN; @@ -1150,9 +1149,8 @@ static void DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio, if( p_audio->i_pts == VLC_TICK_INVALID ) // FIXME --VLC_TICK_INVALID verify audio_output/* { msg_Warn( p_dec, "non-dated audio buffer received" ); -*pi_lost_sum += 1; block_Release( p_audio ); -return; +return VLC_EGENERIC; } /* */ @@ -1184,14 +1182,12 @@ static void DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio, * previous (failing) aout but will try to create a new one. */ atomic_store( _owner->reload, RELOAD_DECODER_AOUT ); } +return VLC_SUCCESS; } -else -{ -msg_Dbg( p_dec, "discarded audio buffer" ); -*pi_lost_sum += 1; -block_Release( p_audio ); -} -return; + +msg_Dbg( p_dec, "discarded audio buffer" ); +block_Release( p_audio ); +return VLC_EGENERIC; } static void DecoderUpdateStatAudio( struct decoder_owner *p_owner, @@ -1212,12 +1208,11 @@ static void DecoderUpdateStatAudio( struct decoder_owner *p_owner, static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf ) { -unsigned lost = 0; struct decoder_owner *p_owner = dec_get_owner( p_dec ); -DecoderPlayAudio( p_owner, p_aout_buf, ); +int success = DecoderPlayAudio( p_owner, p_aout_buf ); -p_owner->pf_update_stat( p_owner, 1, lost ); +p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 ); } static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpic ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: simplify how we report lost pictures
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:09:17 2019 +0200| [654f23202299d974ce88a89f06f7562d898c42ea] | committer: Steve Lhomme decoder: simplify how we report lost pictures No need for pointers. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=654f23202299d974ce88a89f06f7562d898c42ea --- src/input/decoder.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 1e21698c5c..1e9134cde0 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -973,8 +973,7 @@ static void DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc, } } -static void DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture, - unsigned *restrict pi_lost_sum ) +static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture ) { decoder_t *p_dec = _owner->dec; vout_thread_t *p_vout = p_owner->p_vout; @@ -985,7 +984,7 @@ static void DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_pictur { vlc_mutex_unlock( _owner->lock ); picture_Release( p_picture ); -return; +return VLC_SUCCESS; } prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN; @@ -1059,10 +1058,10 @@ static void DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_pictur goto discard; } -return; +return VLC_SUCCESS; discard: -*pi_lost_sum += 1; picture_Release( p_picture ); +return VLC_EGENERIC; } static void DecoderUpdateStatVideo( struct decoder_owner *p_owner, @@ -1084,12 +1083,11 @@ static void DecoderUpdateStatVideo( struct decoder_owner *p_owner, static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic ) { assert( p_pic ); -unsigned i_lost = 0; struct decoder_owner *p_owner = dec_get_owner( p_dec ); -DecoderPlayVideo( p_owner, p_pic, _lost ); +int success = DecoderPlayVideo( p_owner, p_pic ); -p_owner->pf_update_stat( p_owner, 1, i_lost ); +p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 ); } static int thumbnailer_update_format( decoder_t *p_dec ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: remove always true if condition
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:23:41 2019 +0200| [79ab3ac4b286eb2d3c5343e417b62aed79374ebd] | committer: Steve Lhomme decoder: remove always true if condition > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79ab3ac4b286eb2d3c5343e417b62aed79374ebd --- src/input/decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index eb704ac419..3f063ad019 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1167,7 +1167,7 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) audio_output_t *p_aout = p_owner->p_aout; -if( p_aout != NULL && p_audio->i_pts != VLC_TICK_INVALID ) +if( p_aout != NULL ) { int status = aout_DecPlay( p_aout, p_audio ); if( status == AOUT_DEC_CHANGED ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: simplify code
vlc | branch: master | Steve Lhomme | Tue Aug 27 08:51:00 2019 +0200| [ee13e28863057d60869bc4b91dea31adc3aa171d] | committer: Steve Lhomme decoder: simplify code No need for a label to jump to if it's only used at one location. And reorder DecoderPlayAudio() to match the same logic as the Video one. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ee13e28863057d60869bc4b91dea31adc3aa171d --- src/input/decoder.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index b37d8b1c22..ead516f40c 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1036,7 +1036,10 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture /* */ if( p_vout == NULL ) -goto discard; +{ +picture_Release( p_picture ); +return VLC_EGENERIC; +} if( p_picture->b_still ) { @@ -1046,9 +1049,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture vout_PutPicture( p_vout, p_picture ); return VLC_SUCCESS; -discard: -picture_Release( p_picture ); -return VLC_EGENERIC; } static void DecoderUpdateStatVideo( struct decoder_owner *p_owner, @@ -1153,27 +1153,27 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) audio_output_t *p_aout = p_owner->p_aout; -if( p_aout != NULL ) +if( p_aout == NULL ) { -int status = aout_DecPlay( p_aout, p_audio ); -if( status == AOUT_DEC_CHANGED ) -{ -/* Only reload the decoder */ -RequestReload( p_owner ); -} -else if( status == AOUT_DEC_FAILED ) -{ -/* If we reload because the aout failed, we should release it. That - * way, a next call to aout_update_format() won't re-use the - * previous (failing) aout but will try to create a new one. */ -atomic_store( _owner->reload, RELOAD_DECODER_AOUT ); -} -return VLC_SUCCESS; +msg_Dbg( p_dec, "discarded audio buffer" ); +block_Release( p_audio ); +return VLC_EGENERIC; } -msg_Dbg( p_dec, "discarded audio buffer" ); -block_Release( p_audio ); -return VLC_EGENERIC; +int status = aout_DecPlay( p_aout, p_audio ); +if( status == AOUT_DEC_CHANGED ) +{ +/* Only reload the decoder */ +RequestReload( p_owner ); +} +else if( status == AOUT_DEC_FAILED ) +{ +/* If we reload because the aout failed, we should release it. That +* way, a next call to aout_update_format() won't re-use the +* previous (failing) aout but will try to create a new one. */ +atomic_store( _owner->reload, RELOAD_DECODER_AOUT ); +} +return VLC_SUCCESS; } static void DecoderUpdateStatAudio( struct decoder_owner *p_owner, ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: don't check picture/block date against preroll if there's no preroll
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:18:32 2019 +0200| [702b53f8de4b594bba96dfe761bcaff18e27290e] | committer: Steve Lhomme decoder: don't check picture/block date against preroll if there's no preroll > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=702b53f8de4b594bba96dfe761bcaff18e27290e --- src/input/decoder.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 491f18d05b..eb704ac419 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -977,7 +977,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture { decoder_t *p_dec = _owner->dec; vout_thread_t *p_vout = p_owner->p_vout; -bool prerolled; if( p_picture->date == VLC_TICK_INVALID ) /* FIXME: VLC_TICK_INVALID -- verify video_output */ @@ -988,14 +987,14 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture } vlc_mutex_lock( _owner->lock ); -if( p_owner->i_preroll_end > p_picture->date ) +bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN; +if( prerolled && p_owner->i_preroll_end > p_picture->date ) { vlc_mutex_unlock( _owner->lock ); picture_Release( p_picture ); return VLC_SUCCESS; } -prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN; p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; vlc_mutex_unlock( _owner->lock ); @@ -1123,7 +1122,6 @@ static void DecoderQueueThumbnail( decoder_t *p_dec, picture_t *p_pic ) static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) { decoder_t *p_dec = _owner->dec; -bool prerolled; assert( p_audio != NULL ); @@ -1135,14 +1133,14 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) } vlc_mutex_lock( _owner->lock ); -if( p_owner->i_preroll_end > p_audio->i_pts ) +bool prerolled = p_owner->i_preroll_end != (vlc_tick_t)INT64_MIN; +if( prerolled && p_owner->i_preroll_end > p_audio->i_pts ) { vlc_mutex_unlock( _owner->lock ); block_Release( p_audio ); return VLC_SUCCESS; } -prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN; p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN; vlc_mutex_unlock( _owner->lock ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] video_output: simplify setting a new deinterlace mode
vlc | branch: master | Steve Lhomme | Tue Aug 27 10:01:50 2019 +0200| [1afedd4d75e798bf31cadcbb6c642005980df1f7] | committer: Steve Lhomme video_output: simplify setting a new deinterlace mode Don't pass a value if we don't want to change it. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1afedd4d75e798bf31cadcbb6c642005980df1f7 --- src/video_output/video_output.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 468ed533d4..d9c81e92a8 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -744,7 +744,7 @@ typedef struct { static void ThreadChangeFilters(vout_thread_t *vout, const video_format_t *source, const char *filters, -int deinterlace, +const bool *new_deinterlace, bool is_locked) { ThreadFilterFlush(vout, is_locked); @@ -756,8 +756,8 @@ static void ThreadChangeFilters(vout_thread_t *vout, vlc_array_init(_static); vlc_array_init(_interactive); -vout->p->filter.has_deint = - deinterlace == 1 || (deinterlace == -1 && vout->p->filter.has_deint); +if (new_deinterlace != NULL) +vout->p->filter.has_deint = *new_deinterlace; if (vout->p->filter.has_deint) { @@ -903,7 +903,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra } } if (!VideoFormatIsCropArEqual(>format, >p->filter.format)) -ThreadChangeFilters(vout, >format, vout->p->filter.configuration, -1, true); +ThreadChangeFilters(vout, >format, vout->p->filter.configuration, NULL, true); } } @@ -1573,11 +1573,11 @@ static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd) ThreadChangeFilters(vout, NULL, cmd.string != NULL ? cmd.string : vout->p->filter.configuration, --1, false); +NULL, false); break; case VOUT_CONTROL_CHANGE_INTERLACE: ThreadChangeFilters(vout, NULL, vout->p->filter.configuration, -cmd.boolean ? 1 : 0, false); +, false); break; case VOUT_CONTROL_MOUSE_STATE: ThreadProcessMouseState(vout, ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: remove always true boolean
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:25:34 2019 +0200| [d19d234b943f93dfffcea6f1f33dd8591eadefd3] | committer: Steve Lhomme decoder: remove always true boolean The VLC_TICK_INVALID check is done early. After that we don't need to check it anymore. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d19d234b943f93dfffcea6f1f33dd8591eadefd3 --- src/input/decoder.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 3f063ad019..b37d8b1c22 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1025,8 +1025,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture p_picture->b_force = true; } -const bool b_dated = p_picture->date != VLC_TICK_INVALID; - vlc_mutex_unlock( _owner->lock ); /* FIXME: The *input* FIFO should not be locked here. This will not work @@ -1040,24 +1038,12 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture if( p_vout == NULL ) goto discard; -if( p_picture->b_force || p_picture->date != VLC_TICK_INVALID ) -/* FIXME: VLC_TICK_INVALID -- verify video_output */ +if( p_picture->b_still ) { -if( p_picture->b_still ) -{ -/* Ensure no earlier higher pts breaks still state */ -vout_Flush( p_vout, p_picture->date ); -} -vout_PutPicture( p_vout, p_picture ); -} -else -{ -if( b_dated ) -msg_Warn( p_dec, "early picture skipped" ); -else -msg_Warn( p_dec, "non-dated video buffer received" ); -goto discard; +/* Ensure no earlier higher pts breaks still state */ +vout_Flush( p_vout, p_picture->date ); } +vout_PutPicture( p_vout, p_picture ); return VLC_SUCCESS; discard: ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: check missing audio block dates early
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:22:56 2019 +0200| [5507691883883d5f12f245c0a6198b52dc8d2ee4] | committer: Steve Lhomme decoder: check missing audio block dates early Especially before we check this date against the i_preroll_end. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5507691883883d5f12f245c0a6198b52dc8d2ee4 --- src/input/decoder.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index faedada0a3..491f18d05b 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -1127,6 +1127,13 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) assert( p_audio != NULL ); +if( p_audio->i_pts == VLC_TICK_INVALID ) // FIXME --VLC_TICK_INVALID verify audio_output/* +{ +msg_Warn( p_dec, "non-dated audio buffer received" ); +block_Release( p_audio ); +return VLC_EGENERIC; +} + vlc_mutex_lock( _owner->lock ); if( p_owner->i_preroll_end > p_audio->i_pts ) { @@ -1148,13 +1155,6 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio ) } /* */ -if( p_audio->i_pts == VLC_TICK_INVALID ) // FIXME --VLC_TICK_INVALID verify audio_output/* -{ -msg_Warn( p_dec, "non-dated audio buffer received" ); -block_Release( p_audio ); -return VLC_EGENERIC; -} - /* */ vlc_mutex_lock( _owner->lock ); if( p_owner->b_waiting ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] video_output: pass NULL to ThreadChangeFilters() when user filters don't change
vlc | branch: master | Steve Lhomme | Mon Sep 2 15:49:17 2019 +0200| [7a812fc484bc1fc4e60d791bf75306ab6570c17f] | committer: Steve Lhomme video_output: pass NULL to ThreadChangeFilters() when user filters don't change > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a812fc484bc1fc4e60d791bf75306ab6570c17f --- src/video_output/video_output.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index d9c81e92a8..49b9c46a54 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -770,6 +770,7 @@ static void ThreadChangeFilters(vout_thread_t *vout, } } +if (filters == NULL) filters = vout->p->filter.configuration; char *current = filters ? strdup(filters) : NULL; while (current) { config_chain_t *cfg; @@ -903,7 +904,7 @@ static int ThreadDisplayPreparePicture(vout_thread_t *vout, bool reuse, bool fra } } if (!VideoFormatIsCropArEqual(>format, >p->filter.format)) -ThreadChangeFilters(vout, >format, vout->p->filter.configuration, NULL, true); +ThreadChangeFilters(vout, >format, NULL, NULL, true); } } @@ -1570,14 +1571,10 @@ static void ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd) { switch(cmd.type) { case VOUT_CONTROL_CHANGE_FILTERS: -ThreadChangeFilters(vout, NULL, -cmd.string != NULL ? -cmd.string : vout->p->filter.configuration, -NULL, false); +ThreadChangeFilters(vout, NULL, cmd.string, NULL, false); break; case VOUT_CONTROL_CHANGE_INTERLACE: -ThreadChangeFilters(vout, NULL, vout->p->filter.configuration, -, false); +ThreadChangeFilters(vout, NULL, NULL, , false); break; case VOUT_CONTROL_MOUSE_STATE: ThreadProcessMouseState(vout, ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] decoder: check missing picture dates early
vlc | branch: master | Steve Lhomme | Tue Aug 27 07:10:24 2019 +0200| [bc846238495ae752c8b0fff30ec8aa21d750da1a] | committer: Steve Lhomme decoder: check missing picture dates early Especially before we check this date against the i_preroll_end. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bc846238495ae752c8b0fff30ec8aa21d750da1a --- src/input/decoder.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 0590f1d65b..faedada0a3 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -979,6 +979,14 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture vout_thread_t *p_vout = p_owner->p_vout; bool prerolled; +if( p_picture->date == VLC_TICK_INVALID ) +/* FIXME: VLC_TICK_INVALID -- verify video_output */ +{ +msg_Warn( p_dec, "non-dated video buffer received" ); +picture_Release( p_picture ); +return VLC_EGENERIC; +} + vlc_mutex_lock( _owner->lock ); if( p_owner->i_preroll_end > p_picture->date ) { @@ -999,12 +1007,6 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture vout_FlushAll( p_vout ); } -if( p_picture->date == VLC_TICK_INVALID ) -{ -msg_Warn( p_dec, "non-dated video buffer received" ); -goto discard; -} - /* */ vlc_mutex_lock( _owner->lock ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits