diff options
| author | Eric Nelson <eric.nelson@boundarydevices.com> | 2014-06-28 10:58:59 -0700 |
|---|---|---|
| committer | Otavio Salvador <otavio@ossystems.com.br> | 2014-06-30 09:17:26 -0300 |
| commit | d91871446d6baee8397522c4fa10d45985aa8645 (patch) | |
| tree | 2fa5ed3c23b9a71c4ac739d170e8c8928d13d413 | |
| parent | 4d2e747d731ccaa54421081322e8fc34e4a72688 (diff) | |
| download | meta-fsl-arm-d91871446d6baee8397522c4fa10d45985aa8645.tar.gz | |
libfslvpuwrap_1.0.46: fix IOGetVirtMem calls
IOGetVirtMem() returns a pointer or specifically -1 (MAP_FAILED)
in the case of failure, and a couple of calls were improperly testing
for zero.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
| -rw-r--r-- | recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch | 41 | ||||
| -rw-r--r-- | recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb | 2 |
2 files changed, 43 insertions, 0 deletions
diff --git a/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch new file mode 100644 index 0000000..ccd2d9e --- /dev/null +++ b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap/0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 7ca66c10c05168c7d342df7c7a70d4a1ae0629f7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Eric Nelson <eric.nelson@boundarydevices.com> | ||
| 3 | Date: Sat, 28 Jun 2014 09:45:09 -0700 | ||
| 4 | Subject: [PATCH] vpu_wrapper: fix tests of return value from IOGetVirtMem | ||
| 5 | |||
| 6 | IOGetVirtMem() returns a pointer or specifically -1 (MAP_FAILED) | ||
| 7 | in the case of failure. | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | |||
| 11 | Signed-off-by: Laci Tele <laci@boundarydevices.com> | ||
| 12 | Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> | ||
| 13 | --- | ||
| 14 | vpu_wrapper.c | 4 ++-- | ||
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/vpu_wrapper.c b/vpu_wrapper.c | ||
| 18 | index 9249174..148c5df 100755 | ||
| 19 | --- a/vpu_wrapper.c | ||
| 20 | +++ b/vpu_wrapper.c | ||
| 21 | @@ -6653,7 +6653,7 @@ VpuDecRetCode VPU_DecGetMem(VpuMemDesc* pInOutMem) | ||
| 22 | return VPU_DEC_RET_FAILURE; | ||
| 23 | } | ||
| 24 | ret=IOGetVirtMem(&buff); | ||
| 25 | - if(ret==0) //if(ret!=RETCODE_SUCCESS) | ||
| 26 | + if(ret == -1) //if(ret==MAP_FAILED) | ||
| 27 | { | ||
| 28 | VPU_ERROR("%s: get virtual memory failure: size=%d, ret=%d \r\n",__FUNCTION__,buff.size,ret); | ||
| 29 | return VPU_DEC_RET_FAILURE; | ||
| 30 | @@ -8277,7 +8277,7 @@ VpuEncRetCode VPU_EncGetMem(VpuMemDesc* pInOutMem) | ||
| 31 | return VPU_ENC_RET_FAILURE; | ||
| 32 | } | ||
| 33 | ret=IOGetVirtMem(&buff); | ||
| 34 | - if(ret==0) //if(ret!=RETCODE_SUCCESS) | ||
| 35 | + if(ret == -1) //if(ret==MAP_FAILED) | ||
| 36 | { | ||
| 37 | VPU_ENC_ERROR("%s: get virtual memory failure: size=%d, ret=%d \r\n",__FUNCTION__,buff.size,(UINT32)ret); | ||
| 38 | return VPU_ENC_RET_FAILURE; | ||
| 39 | -- | ||
| 40 | 1.9.1 | ||
| 41 | |||
diff --git a/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb index e4970e2..8cc1523 100644 --- a/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb +++ b/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.46.bb | |||
| @@ -10,6 +10,8 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" | |||
| 10 | SRC_URI[md5sum] = "1f50110cb6de8ebf767fb9c5f8baf20d" | 10 | SRC_URI[md5sum] = "1f50110cb6de8ebf767fb9c5f8baf20d" |
| 11 | SRC_URI[sha256sum] = "7fc1258de338339d19a1a35167393fdc4d773682dfd9b951b197403a075f85fd" | 11 | SRC_URI[sha256sum] = "7fc1258de338339d19a1a35167393fdc4d773682dfd9b951b197403a075f85fd" |
| 12 | 12 | ||
| 13 | SRC_URI_append = " file://0001-vpu_wrapper-fix-tests-of-return-value-from-IOGetVirt.patch" | ||
| 14 | |||
| 13 | inherit fsl-eula-unpack autotools pkgconfig | 15 | inherit fsl-eula-unpack autotools pkgconfig |
| 14 | 16 | ||
| 15 | do_install_append() { | 17 | do_install_append() { |
