diff mbox

[09/13] libdvbv5: fix section counting

Message ID 1388245561-8751-9-git-send-email-neolynx@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

André Roth Dec. 28, 2013, 3:45 p.m. UTC
Signed-off-by: André Roth <neolynx@gmail.com>
---
 lib/libdvbv5/dvb-scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mauro Carvalho Chehab Dec. 29, 2013, 3:42 a.m. UTC | #1
Em Sat, 28 Dec 2013 16:45:57 +0100
André Roth <neolynx@gmail.com> escreveu:

> Signed-off-by: André Roth <neolynx@gmail.com>
> ---
>  lib/libdvbv5/dvb-scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
> index bd9d2fb..6f3def6 100644
> --- a/lib/libdvbv5/dvb-scan.c
> +++ b/lib/libdvbv5/dvb-scan.c
> @@ -208,7 +208,7 @@ int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
>  		else if (start_id == h->id && h->section_id == first_section)
>  			break;
>  
> -		if (last_section == -1)
> +		if (last_section == -1 || h->last_section > last_section)

Patch 1.

>  			last_section = h->last_section;
>  
>  		if (!tbl) {
diff mbox

Patch

diff --git a/lib/libdvbv5/dvb-scan.c b/lib/libdvbv5/dvb-scan.c
index bd9d2fb..6f3def6 100644
--- a/lib/libdvbv5/dvb-scan.c
+++ b/lib/libdvbv5/dvb-scan.c
@@ -208,7 +208,7 @@  int dvb_read_section_with_id(struct dvb_v5_fe_parms *parms, int dmx_fd,
 		else if (start_id == h->id && h->section_id == first_section)
 			break;
 
-		if (last_section == -1)
+		if (last_section == -1 || h->last_section > last_section)
 			last_section = h->last_section;
 
 		if (!tbl) {