Commit b6843c7b authored by François Grisez's avatar François Grisez
Browse files

Re-enable the MS_PLAYER_GET_CURRENT_POSITION method of the MKVPlayer filter

parent 7e746e36
......@@ -2409,18 +2409,18 @@ static int player_get_duration(MSFilter *f, void *arg) {
}
static int player_get_current_position(MSFilter *f, void *arg) {
// MKVPlayer *obj = (MKVPlayer *)f->data;
// ms_filter_lock(f);
// if(obj->state == MSPlayerClosed) {
// ms_error("MKVPlayer: cannot get current duration. No file is open");
// goto fail;
// }
// *(int *)arg = matroska_block_get_timestamp(&obj->file);
// ms_filter_unlock(f);
// return 0;
// fail:
// ms_filter_unlock(f);
MKVPlayer *obj = (MKVPlayer *)f->data;
ms_filter_lock(f);
if(obj->state == MSPlayerClosed) {
ms_error("MKVPlayer: cannot get current duration. No file is open");
goto fail;
}
*(int *)arg = obj->time;
ms_filter_unlock(f);
return 0;
fail:
ms_filter_unlock(f);
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment