mirror of
https://github.com/mpv-player/mpv
synced 2025-01-31 20:21:49 +00:00
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:
parent
83a3b732c4
commit
d9f0a7b4ad
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user