[vlc-devel] [PATCH 7/9] input: return 0 when the duration is unknown, rather than -1
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jul 6 15:01:33 CEST 2018
The return value is not checked anywhere and the function is not documented.
---
src/input/item.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/input/item.c b/src/input/item.c
index f488c862dd..1cfe4380d5 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -403,6 +403,8 @@ vlc_tick_t input_item_GetDuration( input_item_t *p_i )
vlc_tick_t i_duration = p_i->i_duration;
vlc_mutex_unlock( &p_i->lock );
+ if (i_duration == INPUT_DURATION_UNKNOWN)
+ return 0;
return i_duration;
}
--
2.17.0
More information about the vlc-devel
mailing list