libeplayer3/container_ass: cosmetics

This commit is contained in:
martii
2013-07-28 14:40:30 +02:00
committed by Stefan Seyfried
parent 998607edfc
commit aa5f59c5e6

View File

@@ -194,7 +194,7 @@ void releaseRegions()
} }
next = firstRegion; next = firstRegion;
while (next != NULL) while (next)
{ {
if (writer) if (writer)
{ {
@@ -243,13 +243,13 @@ void checkRegions()
writer = getDefaultFramebufferWriter(); writer = getDefaultFramebufferWriter();
if (writer == NULL) if (!writer)
{ {
ass_err("no framebuffer writer found!\n"); ass_err("no framebuffer writer found!\n");
} }
prev = next = firstRegion; prev = next = firstRegion;
while (next != NULL) while (next)
{ {
if (now > next->undisplay + cDeltaTime) if (now > next->undisplay + cDeltaTime)
{ {
@@ -385,7 +385,7 @@ static void ASSThread(Context_t *context) {
ass_printf(150, "img %p pts %lu %f\n", img, playPts, playPts / 90.0); ass_printf(150, "img %p pts %lu %f\n", img, playPts, playPts / 90.0);
if(img != NULL && ass_renderer && ass_track) if(img && ass_renderer && ass_track)
{ {
/* the spec says, that if a new set of regions is present /* the spec says, that if a new set of regions is present
* the complete display switches to the new state. So lets * the complete display switches to the new state. So lets
@@ -456,7 +456,7 @@ static void ASSThread(Context_t *context) {
/* api docu said w and h can be zero which /* api docu said w and h can be zero which
* means image should not be rendered * means image should not be rendered
*/ */
if ((img->w != 0) && (img->h != 0) && (writer)) if ((img->w != 0) && (img->h != 0) && writer)
{ {
out.fd = framebufferFD; out.fd = framebufferFD;
out.data = img->bitmap; out.data = img->bitmap;
@@ -483,6 +483,8 @@ static void ASSThread(Context_t *context) {
writer->writeData(&out); writer->writeData(&out);
} }
} }
#if NO_SHARED_FRAMEBUFFER
// currently not needed, but might be useful when switching to cst subtitle implementation in movieplayer
else else
{ {
/* application does not want to share framebuffer, /* application does not want to share framebuffer,
@@ -513,6 +515,7 @@ static void ASSThread(Context_t *context) {
context->output && context->output->subtitle) context->output && context->output->subtitle)
context->output->subtitle->Write(context, &sub_out); context->output->subtitle->Write(context, &sub_out);
} }
#endif
needsBlit = 1; needsBlit = 1;
} }
@@ -520,11 +523,6 @@ static void ASSThread(Context_t *context) {
img = img->next; img = img->next;
} }
} }
else
{
/* noop */
}
releaseMutex(__LINE__); releaseMutex(__LINE__);
} else } else
{ {
@@ -708,8 +706,7 @@ static int container_ass_stop(Context_t *context __attribute__((unused))) {
writer = getDefaultFramebufferWriter(); writer = getDefaultFramebufferWriter();
if (writer != NULL) if (writer) {
{
writer->reset(); writer->reset();
} }