summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/bd.c6
-rw-r--r--libhb/dvd.c4
-rw-r--r--libhb/dvdnav.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/libhb/bd.c b/libhb/bd.c
index b0b540ea5..b587a24f0 100644
--- a/libhb/bd.c
+++ b/libhb/bd.c
@@ -258,12 +258,10 @@ hb_title_t * hb_bd_title_scan( hb_bd_t * d, int tt, uint64_t min_duration )
p_last = &p_cur[1];
}
}
- char *dot_term = strrchr(p_last, '.');
+ snprintf( title->name, sizeof( title->name ), "%s", p_last );
+ char *dot_term = strrchr(title->name, '.');
if (dot_term)
*dot_term = '\0';
- snprintf( title->name, sizeof( title->name ), "%s", p_last );
- strncpy( title->path, d->path, 1024 );
- title->path[1023] = 0;
title->vts = 0;
title->ttn = 0;
diff --git a/libhb/dvd.c b/libhb/dvd.c
index 628585b31..418382317 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -192,10 +192,10 @@ static hb_title_t * hb_dvdread_title_scan( hb_dvd_t * e, int t, uint64_t min_dur
p_last = &p_cur[1];
}
}
- char *dot_term = strrchr(p_last, '.');
+ snprintf( title->name, sizeof( title->name ), "%s", p_last );
+ char *dot_term = strrchr(title->name, '.');
if (dot_term)
*dot_term = '\0';
- snprintf( title->name, sizeof( title->name ), "%s", p_last );
}
/* VTS which our title is in */
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 081116c3b..3c820b789 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -339,10 +339,10 @@ static hb_title_t * hb_dvdnav_title_scan( hb_dvd_t * e, int t, uint64_t min_dura
p_last = &p_cur[1];
}
}
- char *dot_term = strrchr(p_last, '.');
+ snprintf( title->name, sizeof( title->name ), "%s", p_last );
+ char *dot_term = strrchr(title->name, '.');
if (dot_term)
*dot_term = '\0';
- snprintf( title->name, sizeof( title->name ), "%s", p_last );
}
/* VTS which our title is in */