summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_asf.c13
-rw-r--r--src/demuxers/demux_ogg.c8
-rw-r--r--src/demuxers/iff.h4
-rw-r--r--src/input/input_dvb.c11
-rw-r--r--src/input/input_v4l.c26
-rw-r--r--src/input/libreal/sdpplin.c3
-rw-r--r--src/post/goom/convolve_fx.c2
-rw-r--r--src/video_out/video_out_xv.c2
-rw-r--r--src/xine-engine/info_helper.c2
9 files changed, 44 insertions, 27 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 3af265ce4..9d4191633 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.c
@@ -70,6 +70,7 @@
#define ASF_MODE_HTTP_REF 2
#define ASF_MODE_ASF_REF 3
#define ASF_MODE_ENCRYPTED_CONTENT 4
+#define ASF_MODE_NO_CONTENT 5
typedef struct {
int seq;
@@ -443,6 +444,17 @@ static int asf_read_header (demux_asf_t *this) {
asf_stream_t *asf_stream = this->asf_header->streams[i];
asf_demux_stream_t *demux_stream = &this->streams[i];
+ if (!asf_stream) {
+ if (this->mode != ASF_MODE_NO_CONTENT) {
+ xine_log(this->stream->xine, XINE_LOG_MSG,
+ _("demux_asf: warning: A stream appears to be missing.\n"));
+ _x_message(this->stream, XINE_MSG_READ_ERROR,
+ _("Media stream missing?"), NULL);
+ this->mode = ASF_MODE_NO_CONTENT;
+ }
+ return 0;
+ }
+
if (asf_stream->encrypted_flag) {
if (this->mode != ASF_MODE_ENCRYPTED_CONTENT) {
xine_log(this->stream->xine, XINE_LOG_MSG,
@@ -1679,6 +1691,7 @@ static int demux_asf_send_chunk (demux_plugin_t *this_gen) {
return demux_asf_parse_asf_references(this);
case ASF_MODE_ENCRYPTED_CONTENT:
+ case ASF_MODE_NO_CONTENT:
this->status = DEMUX_FINISHED;
return this->status;
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 2cbba982f..9e9de45aa 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -1357,7 +1357,7 @@ static void send_header (demux_ogg_t *this) {
this->ignore_keyframes = 0;
while (!done) {
- if (!read_ogg_packet(this)) {
+ if (!read_ogg_packet(this) || !this->og.header || !this->og.body) {
return;
}
/* now we've got at least one new page */
@@ -1483,6 +1483,12 @@ static int demux_ogg_send_chunk (demux_plugin_t *this_gen) {
return this->status;
}
+ if (!this->og.header || !this->og.body) {
+ this->status = DEMUX_FINISHED;
+ lprintf ("EOF\n");
+ return this->status;
+ }
+
/* now we've got one new page */
cur_serno = ogg_page_serialno (&this->og);
diff --git a/src/demuxers/iff.h b/src/demuxers/iff.h
index 94830f69c..8ac24a697 100644
--- a/src/demuxers/iff.h
+++ b/src/demuxers/iff.h
@@ -27,8 +27,8 @@
#define IFFP_IFF_H
#define IFF_OKAY 0L
-#define CLIENT_ERROR 1L
-#define NOFILE 5L
+#define IFF_CLIENT_ERROR 1L
+#define IFF_NOFILE 5L
#define FOURCC_CHUNK BE_FOURCC
#define IFF_16SV_CHUNK FOURCC_CHUNK('1', '6', 'S', 'V')
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index bc279b78b..19b479a06 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -1664,21 +1664,22 @@ static void load_epg_data(dvb_input_plugin_t *this)
}
/* Prints text to an area, tries to cut the lines in between words. */
-static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, char* text,
+static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, const char* text,
int x, int y, int row_space,
int max_x, int max_y, int* height, int color_base) {
/* The position of the text to be printed. */
- char* cursor = text;
+ const char* cursor = text;
+ const char *const text_end = text + strlen(text);
/* The line to be printed next. */
char text_line[512];
int text_width, text_height;
size_t old_line_length, line_cursor;
- char* bound, *old_bound;
+ const char* bound, *old_bound;
*height = 0;
- while (cursor < text + strlen(text)) {
+ while (cursor < text_end) {
bound = cursor;
line_cursor = 0;
text_line[0] = '\0';
@@ -1735,7 +1736,7 @@ static void render_text_area(osd_renderer_t* renderer, osd_object_t* osd, char*
}
/* OK, it did fit, let's try to fit some more. */
- } while (bound < text + strlen(text));
+ } while (bound < text_end);
if (y + text_height + row_space > max_y) {
break;
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 00c579c44..b97f11ace 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -549,6 +549,12 @@ static int set_frequency(v4l_input_plugin_t *this, unsigned long frequency)
fd = this->radio_fd;
if (frequency != 0) {
+ /* FIXME: Don't assume tuner 0 ? */
+ this->tuner = 0;
+ ret = ioctl(fd, VIDIOCSTUNER, &this->tuner);
+ lprintf("(%d) Response on set tuner to %d\n", ret, this->tuner);
+ this->video_tuner.tuner = this->tuner;
+
if (this->video_tuner.flags & VIDEO_TUNER_LOW) {
this->calc_frequency = frequency * 16;
} else {
@@ -683,16 +689,6 @@ static int search_by_channel(v4l_input_plugin_t *this, char *input_source)
ret = ioctl(fd, VIDIOCSCHAN, &this->input);
lprintf("(%d) Set channel to %d\n", ret, this->input);
-
- /* FIXME: Don't assume tuner 0 ? */
-
- this->tuner = 0;
-
- ret = ioctl(fd, VIDIOCSTUNER, &this->tuner);
-
- lprintf("(%d) Response on set tuner to %d\n", ret, this->tuner);
-
- this->video_tuner.tuner = this->tuner;
} else {
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
"input_v4l: Not setting video source. No source given\n");
@@ -892,10 +888,6 @@ static int open_video_capture_device(v4l_input_plugin_t *this)
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- /* Pre-allocate some frames for audio and video so it doesn't have to be
- * done during capture */
- allocate_frames(this, 1);
-
/* Unmute audio off video capture device */
unmute_audio(this);
@@ -1004,7 +996,11 @@ static int open_video_capture_device(v4l_input_plugin_t *this)
xine_set_param(this->stream, XINE_PARAM_VO_ZOOM_X, 103);
xine_set_param(this->stream, XINE_PARAM_VO_ZOOM_Y, 103);
-
+
+ /* Pre-allocate some frames for audio and video so it doesn't have to be
+ * done during capture */
+ allocate_frames(this, 1);
+
/* If we made it here, everything went ok */
this->audio_only = 0;
if (tuner_found)
diff --git a/src/input/libreal/sdpplin.c b/src/input/libreal/sdpplin.c
index f3672559c..c1fab49c1 100644
--- a/src/input/libreal/sdpplin.c
+++ b/src/input/libreal/sdpplin.c
@@ -60,7 +60,8 @@ static char *b64_decode(const char *in, char *out, int *size)
k=0;
/*CONSTANTCONDITION*/
- for (j=0; j<strlen(in); j+=4)
+ const size_t in_len = strlen(in);
+ for (j=0; j<in_len; j+=4)
{
char a[4], b[4];
diff --git a/src/post/goom/convolve_fx.c b/src/post/goom/convolve_fx.c
index e86bb3723..c394f3bf8 100644
--- a/src/post/goom/convolve_fx.c
+++ b/src/post/goom/convolve_fx.c
@@ -20,7 +20,7 @@ typedef char Motif[CONV_MOTIF_W][CONV_MOTIF_W];
#define NB_THETA 512
-#define MAX 2.0f
+//#define MAX 2.0f
typedef struct _CONV_DATA{
PluginParam light;
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 8f5da8ea0..6a11ebc34 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -524,7 +524,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) {
for( i = 0; i < VO_NUM_RECENT_FRAMES; i++ )
if( this->recent_frames[i] && this->recent_frames[i]->width == frame->width &&
this->recent_frames[i]->height == frame->height )
- recent_bitmaps[i] = this->recent_frames[i]->image->data + frame->width*frame->height;
+ recent_bitmaps[i] = this->recent_frames[i]->image->data + this->deinterlace_frame.image->width*frame->height;
else
recent_bitmaps[i] = NULL;
diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c
index 242805915..34d1bbdba 100644
--- a/src/xine-engine/info_helper.c
+++ b/src/xine-engine/info_helper.c
@@ -131,7 +131,7 @@ uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info) {
* at the end of the string
*/
static void meta_info_chomp(char *str) {
- size_t i, len;
+ ssize_t i, len;
len = strlen(str);
if (!len)