spudec: support "clear" packet type

Support "clear" packets that contain no data but instead clear the
screen at a given time.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32410 b3059339-0415-0410-9bf9-f77b7e298cf2

Reindent.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32411 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-09-29 19:05:13 +00:00 committed by Uoti Urpala
parent b4c7efdfe1
commit 2b01fc0678
1 changed files with 15 additions and 13 deletions

View File

@ -1367,6 +1367,7 @@ void spudec_set_paletted(void *this, const uint8_t *pal_img, int pal_stride,
packet->start_col = x;
packet->start_row = y;
packet->data_len = 2 * stride * h;
if (packet->data_len) { // size 0 is a special "clear" packet
packet->packet = malloc(packet->data_len);
img = packet->packet;
aimg = packet->packet + stride * h;
@ -1381,6 +1382,7 @@ void spudec_set_paletted(void *this, const uint8_t *pal_img, int pal_stride,
}
pal2gray_alpha(g8a8_pal, pal_img, pal_stride,
img, aimg, stride, w, h);
}
packet->start_pts = 0;
packet->end_pts = 0x7fffffff;
if (pts != MP_NOPTS_VALUE)