From b5ff2c2138345efa8a2f06ead8217486ac690b87 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 29 May 2018 18:06:21 +0200 Subject: [PATCH] fix framerate for movieplayer Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/6ad87ad3c1db2107aaec1e462711192269b53fbf Author: Jacek Jendrzej Date: 2018-05-29 (Tue, 29 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 6fb8495..16e209b 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -730,7 +730,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);