Skip to content

Commit

Permalink
LinGui: Fix live preview reset for previews > 10
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5439 b64f7644-9d1e-0410-96f1-a4d463321fa5
  • Loading branch information
jstebbins committed May 3, 2013
1 parent 3091aba commit fb4d48a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gtk/src/preview.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions gtk/src/preview.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fb4d48a

Please sign in to comment.