History

stream_bluray: implement STREAM_CTRL_GET_TITLE_LENGTH

Kacper Michajłow committed 1 year ago

Commit d91eea21 parent b594fc21 file · +10 −0Browse files

Unified · Split

stream/stream_bluray.c+10−0
@@ -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) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t