summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-22 20:02:47 +0200
committerwm4 <wm4@nowhere>2015-05-22 20:02:47 +0200
commitd26803cba00f9ecfe7c1c0914f133e775638183b (patch)
treefec123e784792ee40d9fbc412e993a52dc127569 /player/command.c
parentc2f9e3d2b3431ae750aa3b51a0a60d7bf73deb0f (diff)
downloadmpv-d26803cba00f9ecfe7c1c0914f133e775638183b.tar.bz2
mpv-d26803cba00f9ecfe7c1c0914f133e775638183b.tar.xz
command: deprecate the "length" property
It collides with the --length option.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index e849275547..168c1f8394 100644
--- a/player/command.c
+++ b/player/command.c
@@ -487,9 +487,8 @@ static int property_time(int action, void *arg, double time)
return M_PROPERTY_NOT_IMPLEMENTED;
}
-/// Media length in seconds (RO)
-static int mp_property_length(void *ctx, struct m_property *prop,
- int action, void *arg)
+static int mp_property_duration(void *ctx, struct m_property *prop,
+ int action, void *arg)
{
MPContext *mpctx = ctx;
double len = get_time_length(mpctx);
@@ -3287,7 +3286,8 @@ static const struct m_property mp_properties[] = {
{"file-format", mp_property_file_format},
{"stream-pos", mp_property_stream_pos},
{"stream-end", mp_property_stream_end},
- {"length", mp_property_length},
+ {"duration", mp_property_duration},
+ M_PROPERTY_DEPRECATED_ALIAS("length", "duration"),
{"avsync", mp_property_avsync},
{"total-avsync-change", mp_property_total_avsync_change},
{"drop-frame-count", mp_property_drop_frame_cnt},