summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorxylosper <darklin20@gmail.com>2014-03-30 09:44:18 +0900
committerxylosper <darklin20@gmail.com>2014-03-30 10:01:43 +0900
commit9946b8d4dd29959d5a8f9576fe7ef20b64d4b7ce (patch)
treef738491730c79d9d4f207824e93239df0959caee /stream
parent8cee8279ad4b8aaf5c89056db5a1f9e3575f8eee (diff)
downloadmpv-9946b8d4dd29959d5a8f9576fe7ef20b64d4b7ce.tar.bz2
mpv-9946b8d4dd29959d5a8f9576fe7ef20b64d4b7ce.tar.xz
stream_bluray: use more proper error code for stream control
Use STREAM_OK instead of hardcoded value 1. Handle failure of setting title as an unsupported behaviour rather than an error.
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_bluray.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index 524854396c..3dd6806b60 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -477,7 +477,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
*((unsigned int *) arg) = ti->chapter_count;
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_GET_CHAPTER_TIME: {
@@ -504,15 +504,15 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
b->current_title = title;
return STREAM_OK;
}
- return STREAM_ERROR;
+ return STREAM_UNSUPPORTED;
}
case STREAM_CTRL_GET_CURRENT_TITLE: {
*((unsigned int *) arg) = b->current_title;
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_GET_NUM_TITLES: {
*((unsigned int *)arg) = b->num_titles;
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_GET_TIME_LENGTH: {
@@ -545,12 +545,12 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
*((int *) arg) = ti->angle_count;
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_GET_ANGLE: {
*((int *) arg) = b->current_angle;
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_SET_ANGLE: {
@@ -567,7 +567,7 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg)
b->current_angle = angle;
bd_seamless_angle_change(b->bd, angle);
- return 1;
+ return STREAM_OK;
}
case STREAM_CTRL_GET_LANG: {