summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dxr3/dxr3_decode_spu.c16
-rw-r--r--src/dxr3/dxr3_decode_video.c14
-rw-r--r--src/xine-engine/load_plugins.c9
-rw-r--r--src/xine-engine/post.c2
4 files changed, 15 insertions, 26 deletions
diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c
index 7c51b5c4b..f3163e331 100644
--- a/src/dxr3/dxr3_decode_spu.c
+++ b/src/dxr3/dxr3_decode_spu.c
@@ -144,19 +144,15 @@ static inline void dxr3_swab_clut(int* clut);
/* inline helper implementations */
static inline int dxr3_present(xine_stream_t *stream)
{
- plugin_node_t *node;
- video_driver_class_t *vo_class;
int present = 0;
- if (stream->video_driver && stream->video_driver->node) {
- node = (plugin_node_t *)stream->video_driver->node;
- if (node->plugin_class) {
- vo_class = (video_driver_class_t *)node->plugin_class;
- if (vo_class->identifier)
- present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0);
- }
+ if (stream->video_driver && stream->video_driver->node &&
+ stream->video_driver->node->plugin_class ) {
+ const video_driver_class_t *const vo_class = (video_driver_class_t *)node->plugin_class;
+ if (vo_class->identifier)
+ present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0);
}
- llprintf(LOG_SPU, "dxr3 %s\n", present ? "present" : "not present");
+ llprintf(LOG_VID, "dxr3 %s\n", present ? "present" : "not present");
return present;
}
diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c
index a10fa11c8..9eb0527d1 100644
--- a/src/dxr3/dxr3_decode_video.c
+++ b/src/dxr3/dxr3_decode_video.c
@@ -158,17 +158,13 @@ static void dxr3_update_correct_durations(void *this_gen, xine_cfg_entry_t
/* inline helper implementations */
static inline int dxr3_present(xine_stream_t *stream)
{
- plugin_node_t *node;
- video_driver_class_t *vo_class;
int present = 0;
- if (stream->video_driver && stream->video_driver->node) {
- node = (plugin_node_t *)stream->video_driver->node;
- if (node->plugin_class) {
- vo_class = (video_driver_class_t *)node->plugin_class;
- if (vo_class->identifier)
- present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0);
- }
+ if (stream->video_driver && stream->video_driver->node &&
+ stream->video_driver->node->plugin_class ) {
+ const video_driver_class_t *const vo_class = (video_driver_class_t *)node->plugin_class;
+ if (vo_class->identifier)
+ present = (strcmp(vo_class->identifier, DXR3_VO_ID) == 0);
}
llprintf(LOG_VID, "dxr3 %s\n", present ? "present" : "not present");
return present;
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index f641281d8..5f0da4cff 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -1254,10 +1254,9 @@ input_plugin_t *_x_find_input_plugin (xine_stream_t *stream, const char *mrl) {
void _x_free_input_plugin (xine_stream_t *stream, input_plugin_t *input) {
plugin_catalog_t *catalog = stream->xine->plugin_catalog;
- plugin_node_t *node = input->node;
input->dispose(input);
- if (node) {
+ if (input->node) {
pthread_mutex_lock(&catalog->lock);
dec_node_ref(node);
pthread_mutex_unlock(&catalog->lock);
@@ -1476,10 +1475,9 @@ demux_plugin_t *_x_find_demux_plugin_last_probe(xine_stream_t *stream, const cha
void _x_free_demux_plugin (xine_stream_t *stream, demux_plugin_t *demux) {
plugin_catalog_t *catalog = stream->xine->plugin_catalog;
- plugin_node_t *node = demux->node;
demux->dispose(demux);
- if (node) {
+ if (demux->node) {
pthread_mutex_lock(&catalog->lock);
dec_node_ref(node);
pthread_mutex_unlock(&catalog->lock);
@@ -1971,11 +1969,10 @@ video_decoder_t *_x_get_video_decoder (xine_stream_t *stream, uint8_t stream_typ
void _x_free_video_decoder (xine_stream_t *stream, video_decoder_t *vd) {
plugin_catalog_t *catalog = stream->xine->plugin_catalog;
- plugin_node_t *node = vd->node;
vd->dispose (vd);
- if (node) {
+ if (vd->node) {
pthread_mutex_lock (&catalog->lock);
dec_node_ref(node);
pthread_mutex_unlock (&catalog->lock);
diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c
index e057ff99f..651bb10f3 100644
--- a/src/xine-engine/post.c
+++ b/src/xine-engine/post.c
@@ -891,7 +891,7 @@ int _x_post_dispose(post_plugin_t *this) {
/* since the plugin loader does not know, when the plugin gets disposed,
* we have to handle the reference counter here */
pthread_mutex_lock(&this->xine->plugin_catalog->lock);
- ((plugin_node_t *)this->node)->ref--;
+ this->node->ref--;
pthread_mutex_unlock(&this->xine->plugin_catalog->lock);
return 1;