diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_ts.c | 25 | ||||
-rw-r--r-- | src/liba52/xine_a52_decoder.c | 6 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 2 | ||||
-rw-r--r-- | src/xine-engine/configfile.c | 4 | ||||
-rw-r--r-- | src/xine-engine/io_helper.c | 16 |
5 files changed, 32 insertions, 21 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 089d37619..d38ff19ca 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2483,22 +2483,33 @@ static int demux_ts_get_optional_data(demux_plugin_t *this_gen, { case DEMUX_OPTIONAL_DATA_AUDIOLANG: if ((channel >= 0) && (channel < this->audio_tracks_count)) { - if(this->audio_tracks[channel].lang) + if (this->audio_tracks[channel].lang[0]) { strcpy(str, this->audio_tracks[channel].lang); - else - sprintf(str, "%3i", _x_get_audio_channel(this->stream)); + } else { + /* input plugin may know the language */ + if (this->input->get_capabilities(this->input) & INPUT_CAP_AUDIOLANG) + return DEMUX_OPTIONAL_UNSUPPORTED; + sprintf(str, "%3i", channel); + } } else { - snprintf(str, XINE_LANG_MAX, "%3i", _x_get_audio_channel(this->stream)); + strcpy(str, "none"); } return DEMUX_OPTIONAL_SUCCESS; case DEMUX_OPTIONAL_DATA_SPULANG: if (channel>=0 && channel<this->spu_langs_count) { - memcpy(str, this->spu_langs[channel].desc.lang, 3); - str[3] = 0;} - else + if (this->spu_langs[channel].desc.lang[0]) { + strcpy(str, this->spu_langs[channel].desc.lang); + } else { + /* input plugin may know the language */ + if (this->input->get_capabilities(this->input) & INPUT_CAP_SPULANG) + return DEMUX_OPTIONAL_UNSUPPORTED; + sprintf(str, "%3i", channel); + } + } else { strcpy(str, "none"); + } return DEMUX_OPTIONAL_SUCCESS; default: diff --git a/src/liba52/xine_a52_decoder.c b/src/liba52/xine_a52_decoder.c index 9e590f77d..b4b628c81 100644 --- a/src/liba52/xine_a52_decoder.c +++ b/src/liba52/xine_a52_decoder.c @@ -53,12 +53,6 @@ # include "a52.h" #endif -#ifdef HAVE_A52DEC_A52_INTERNAL_H -# include <a52dec/a52_internal.h> -#else -# include "a52_internal.h" -#endif - #include "buffer.h" #include "xineutils.h" diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index 913b29115..20b2d0754 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -1187,6 +1187,8 @@ static const audio_db_t audio_db[] = { }, { { + ME_FOURCC('E', 'A', 'C', '3'), + ME_FOURCC('e', 'c', '-', '3'), 0 }, BUF_AUDIO_EAC3, diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index ca82c7b9e..cc53e646c 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -1021,7 +1021,9 @@ void xine_config_save (xine_t *xine, const char *filename) { buf = (char *) malloc(config_stat.st_size + 1); if((rlen = fread(buf, 1, config_stat.st_size, f_config)) && ((off_t)rlen == config_stat.st_size)) { - (void) fwrite(buf, 1, rlen, f_backup); + if (rlen != fwrite(buf, 1, rlen, f_backup)) { + lprintf("backing up configfile to %s failed\n", temp); + } } free(buf); diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c index 22f34ffc2..eef843906 100644 --- a/src/xine-engine/io_helper.c +++ b/src/xine-engine/io_helper.c @@ -87,17 +87,19 @@ static int _x_io_tcp_connect_ipv4(xine_stream_t *stream, const char *host, int p for (i = 0; h->h_addr_list[i]; i++) { struct in_addr ia; - struct sockaddr_in sin; - + union { + struct sockaddr sa; + struct sockaddr_in in; + } saddr; memcpy (&ia, h->h_addr_list[i], 4); - sin.sin_family = AF_INET; - sin.sin_addr = ia; - sin.sin_port = htons(port); + saddr.in.sin_family = AF_INET; + saddr.in.sin_addr = ia; + saddr.in.sin_port = htons(port); #ifndef WIN32 - if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && errno != EINPROGRESS) { + if (connect(s, &saddr.sa, sizeof(saddr.in))==-1 && errno != EINPROGRESS) { #else - if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && WSAGetLastError() != WSAEWOULDBLOCK) { + if (connect(s, &saddr.sa, sizeof(saddr.in))==-1 && WSAGetLastError() != WSAEWOULDBLOCK) { if (stream) xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "io_helper: WSAGetLastError() = %d\n", WSAGetLastError()); #endif /* WIN32 */ |