[libdvdnav-devel] [PATCH 1/2] dvdnav_get_video_resolution: return an appropriate DVDNAV_STATUS code instead of -1 or 0.
Andreas Zelend
ace at kodi.tv
Wed Nov 22 14:52:02 CET 2017
From: ace20022 <ace20022 at ymail.com>
---
src/dvdnav.c | 6 +++---
src/dvdnav/dvdnav.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/dvdnav.c b/src/dvdnav.c
index ae267d5..45df86f 100644
--- a/src/dvdnav.c
+++ b/src/dvdnav.c
@@ -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) {
diff --git a/src/dvdnav/dvdnav.h b/src/dvdnav/dvdnav.h
index 8d68102..55dd621 100644
--- a/src/dvdnav/dvdnav.h
+++ b/src/dvdnav/dvdnav.h
@@ -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.
--
2.11.0.windows.1
More information about the libdvdnav-devel
mailing list