Unified · Split
| @@ -265,6 +265,16 @@ static int bluray_stream_control(stream_t *s, int cmd, void *arg) · 264 unmodified lines | |||
| 265 | bd_seamless_angle_change(b->bd, angle); | 265 | bd_seamless_angle_change(b->bd, angle); |
| 266 | return STREAM_OK; | 266 | return STREAM_OK; |
| 267 | } | 267 | } |
| 268 | case STREAM_CTRL_GET_TITLE_LENGTH: { | ||
| 269 | int title = *(double *)arg; | ||
| 270 | if (!b->bd || title < 0 || title >= b->num_titles) | ||
| 271 | return STREAM_UNSUPPORTED; | ||
| 272 | const BLURAY_TITLE_INFO *ti = bd_get_title_info(b->bd, title, 0); | ||
| 273 | if (!ti) | ||
| 274 | return STREAM_UNSUPPORTED; | ||
| 275 | *(double *)arg = BD_TIME_TO_MP(ti->duration); | ||
| 276 | return STREAM_OK; | ||
| 277 | } | ||
| 268 | case STREAM_CTRL_GET_LANG: { | 278 | case STREAM_CTRL_GET_LANG: { |
| 269 | const BLURAY_TITLE_INFO *ti = b->title_info; | 279 | const BLURAY_TITLE_INFO *ti = b->title_info; |
| 270 | if (ti && ti->clip_count) { | 280 | if (ti && ti->clip_count) { |