summaryrefslogtreecommitdiffstats
path: root/libhb/bd.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-05-27 18:40:27 +0000
committerjstebbins <[email protected]>2014-05-27 18:40:27 +0000
commit0340cdc16c3cf51f24a2ddfcb40cd8d3b7257e17 (patch)
treea495a8b246ce107451c5a2528f61338c1d9bcf3b /libhb/bd.c
parent9ab2cefc88f522c02817a248e2b8d964d186c04f (diff)
libhb: fix overwriting of source path
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6206 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/bd.c')
-rw-r--r--libhb/bd.c6
1 files changed, 2 insertions, 4 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;