[MPlayer-dev-eng] [PATCH] sig11 in subreader.c
Oskar Liljeblad
oskar at osk.mine.nu
Fri Jan 3 10:28:25 CET 2003
No one seemed to notice this patch, but it is an obvious
fix to a crash if you have subtitle files with only one
subtitle...
The problem was that j (and sometimes i) became negative
(-1 to be exact) in the loops below...
Oskar (oskar at osk.mine.nu)
diff -u -p subreader.c.v0 subreader.c
--- subreader.c.v0 2002-12-31 23:19:59.000000000 +0100
+++ subreader.c 2002-12-31 23:23:39.000000000 +0100
@@ -1215,8 +1215,8 @@ if(suboverlap_enabled){
}
adjust_subs_time(second, 6.0, fps, 1); /* ~6 secs AST */
- for (j = sub_orig - 1; j <= 0; --j) {
- for (i = first[j].lines - 1; i <= 0; --i) {
+ for (j = sub_orig - 1; j >= 0; j--) {
+ for (i = first[j].lines - 1; i >= 0; i--) {
free(first[j].text[i]);
}
free(&first[j]);
More information about the MPlayer-dev-eng
mailing list