More checks in ass_render_event.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19656 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
eugeni 2006-09-03 17:25:04 +00:00
parent 83a3b732c4
commit d9f0a7b4ad
1 changed files with 9 additions and 7 deletions

View File

@ -1514,6 +1514,15 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
int alignment, halign, valign;
int device_x = 0, device_y = 0;
if (!event->Style) {
mp_msg(MSGT_GLOBAL, MSGL_WARN, "No style found!\n");
return 1;
}
if (!event->Text) {
mp_msg(MSGT_GLOBAL, MSGL_WARN, "Empty event!\n");
return 1;
}
init_render_context(event);
text_info.length = 0;
@ -1521,14 +1530,7 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
pen.y = 0;
previous = 0;
num_glyphs = 0;
p = event->Text;
if (!p) {
mp_msg(MSGT_GLOBAL, MSGL_WARN, "Empty event!\n");
return 1;
}
// Event parsing.
while (1) {
render_context.effect_type = EF_NONE;