aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-30 06:53:06 +0000
committerGravatar albeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-30 06:53:06 +0000
commit4918b7bb5bf76a0ef52b8cb109b8cab80167e9b8 (patch)
tree25dd3eb5524eb8ece53dacd6b4c03e671057f9e3
parenta3a73031d5fc7f60236854f933b230fbd17ebd81 (diff)
Add PRINT to the samplerate property.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23414 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/command.c b/command.c
index dc2f5b5cbc..7eeb636598 100644
--- a/command.c
+++ b/command.c
@@ -499,6 +499,13 @@ static int mp_property_samplerate(m_option_t * prop, int action, void *arg,
{
if (!mpctx->sh_audio)
return M_PROPERTY_UNAVAILABLE;
+ switch(action) {
+ case M_PROPERTY_PRINT:
+ if(!arg) return M_PROPERTY_ERROR;
+ *(char**)arg = malloc(16);
+ sprintf(*(char**)arg,"%d kHz",mpctx->sh_audio->samplerate/1000);
+ return M_PROPERTY_OK;
+ }
return m_property_int_ro(prop, action, arg, mpctx->sh_audio->samplerate);
}