changeset 30690:d3bdd149294e

Fix check for wrong variable: len can be unitialized but not normally < 0, the return value needs to be checked to detect an error.
author reimar
date Thu, 25 Feb 2010 22:06:05 +0000
parents ebe42a93c6c3
children f73aca2453a3
files libmpcodecs/ad_hwmpa.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_hwmpa.c	Thu Feb 25 21:27:22 2010 +0000
+++ b/libmpcodecs/ad_hwmpa.c	Thu Feb 25 22:06:05 2010 +0000
@@ -151,7 +151,7 @@
 				return CONTROL_FALSE;
 		case ADCTRL_SKIP_FRAME:
 			start = mpa_sync(sh, 2, &len, NULL, NULL, NULL, NULL, NULL);
-			if(len < 0)
+			if(start < 0)
 				return CONTROL_FALSE;
 
 			sh->a_in_buffer_len -= start;