Commit c1f20ed3 authored by Andreas Zelend's avatar Andreas Zelend Committed by Jean-Baptiste Kempf

dvdnav_get_video_resolution: return an appropriate DVDNAV_STATUS code instead of -1 or 0.

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0e0ed2a5
......@@ -935,12 +935,12 @@ uint8_t dvdnav_get_video_aspect(dvdnav_t *this) {
return retval;
}
int dvdnav_get_video_resolution(dvdnav_t *this, uint32_t *width, uint32_t *height) {
dvdnav_status_t dvdnav_get_video_resolution(dvdnav_t *this, uint32_t *width, uint32_t *height) {
int w, h;
if(!this->started) {
printerr("Virtual DVD machine not started.");
return -1;
return DVDNAV_STATUS_ERR;
}
pthread_mutex_lock(&this->vm_lock);
......@@ -949,7 +949,7 @@ int dvdnav_get_video_resolution(dvdnav_t *this, uint32_t *width, uint32_t *heigh
*width = w;
*height = h;
return 0;
return DVDNAV_STATUS_OK;
}
uint8_t dvdnav_get_video_scale_permission(dvdnav_t *this) {
......
......@@ -571,7 +571,7 @@ uint8_t dvdnav_get_video_aspect(dvdnav_t *self);
/*
* Get video resolution.
*/
int dvdnav_get_video_resolution(dvdnav_t *self, uint32_t *width, uint32_t *height);
dvdnav_status_t dvdnav_get_video_resolution(dvdnav_t *self, uint32_t *width, uint32_t *height);
/*
* Get video scaling permissions.
......
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