summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2013-05-03 20:37:47 +0000
committerjstebbins <[email protected]>2013-05-03 20:37:47 +0000
commitfb4d48ae4f68461147c1c99b311435391e81ac60 (patch)
tree9d977a6133fc246baee5fa5893dec8005e1a21a0 /gtk
parent3091abaeaf79534fa22adefa1ad79448cc11b40b (diff)
LinGui: Fix live preview reset for previews > 10
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5439 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/preview.c4
-rw-r--r--gtk/src/preview.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 3be436442..126943a54 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -62,7 +62,7 @@ struct preview_s
gint frame;
gint state;
gboolean pause;
- gboolean encoded[60];
+ gboolean encoded[GHB_PREVIEW_MAX];
gint encode_frame;
gint live_id;
gchar *current;
@@ -733,7 +733,7 @@ ghb_live_reset(signal_user_data_t *ud)
ud->preview->current = NULL;
}
encoded = ud->preview->encoded[ud->preview->frame];
- memset(ud->preview->encoded, 0, sizeof(gboolean) * 10);
+ memset(ud->preview->encoded, 0, sizeof(gboolean) * GHB_PREVIEW_MAX);
if (encoded)
ghb_set_preview_image(ud);
}
diff --git a/gtk/src/preview.h b/gtk/src/preview.h
index 089d60d1c..56d62415b 100644
--- a/gtk/src/preview.h
+++ b/gtk/src/preview.h
@@ -16,6 +16,8 @@
#if !defined(_GHB_PREVIEW_H_)
#define _GHB_PREVIEW_H_
+#define GHB_PREVIEW_MAX 60
+
#define MOD_ROUND(v,m) ((m==1)?v:(m * ((v + (m>>1)) / m)))
#define MOD_DOWN(v,m) (m * (v / m))
#define MOD_UP(v,m) (m * ((v + m - 1) / m))