diff --git a/libspark/video.cpp b/libspark/video.cpp index a190ac8..8510ca5 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -392,7 +392,7 @@ int cVideo::getAspectRatio(void) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ int n = proc_get_hex(VMPEG_aspect[devnum]); - return n * 2 + 1; + return n; } if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0) { @@ -800,7 +800,7 @@ static inline int rate2csapi(int rate) return 4; case 50000: return 5; - case 50940: + case 59940: return 6; case 60000: return 7; @@ -817,7 +817,10 @@ void cVideo::getPictureInfo(int &width, int &height, int &rate) if (fd == -1) { /* in movieplayer mode, fd is not opened -> fall back to procfs */ - r = proc_get_hex(VMPEG_framerate[devnum]); + char buf[16]; + int n = proc_get(VMPEG_framerate[devnum], buf, 16); + if (n > 0) + sscanf(buf, "%i", &r); width = proc_get_hex(VMPEG_xres[devnum]); height = proc_get_hex(VMPEG_yres[devnum]); rate = rate2csapi(r);