summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_avi.c15
-rw-r--r--src/demuxers/demux_real.c7
2 files changed, 19 insertions, 3 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 6610d8fca..93d88c263 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_avi.c,v 1.201 2004/05/16 18:01:27 tmattern Exp $
+ * $Id: demux_avi.c,v 1.202 2004/05/27 11:10:11 miguelfreitas Exp $
*
* demultiplexer for avi streams
*
@@ -879,7 +879,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
hdrl_data[i], hdrl_data[i+1], hdrl_data[i+2], hdrl_data[i+3]);
if(strncasecmp(hdrl_data + i, "vids", 4) == 0 && !vids_strh_seen) {
- AVI->compressor = *(uint32_t *) hdrl_data + i + 4;
+ AVI->compressor = *(uint32_t *) (hdrl_data + i + 4);
AVI->dwInitialFrames = LE_32(hdrl_data + i + 16);
AVI->dwScale = LE_32(hdrl_data + i + 20);
AVI->dwRate = LE_32(hdrl_data + i + 24);
@@ -1880,6 +1880,17 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
(int)this->avi->audio[i]->wavex->wFormatTag);
}
+ /*
+ * I don't know who should we trust more, if avi->compressor or bih->biCompression.
+ * however, at least for this case (compressor: xvid biCompression: DIVX), the
+ * xvid fourcc must prevail as it is used by ffmpeg to detect encoder bugs. [MF]
+ */
+ if( _x_fourcc_to_buf_video(this->avi->compressor) == BUF_VIDEO_XVID &&
+ _x_fourcc_to_buf_video(this->avi->bih->biCompression) == BUF_VIDEO_MPEG4 ) {
+ this->avi->bih->biCompression = this->avi->compressor;
+ this->avi->video_type = BUF_VIDEO_XVID;
+ }
+
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, !this->no_audio);
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index 45e10c41d..438ce33ba 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -31,7 +31,7 @@
*
* Based on FFmpeg's libav/rm.c.
*
- * $Id: demux_real.c,v 1.98 2004/05/23 16:05:47 jstembridge Exp $
+ * $Id: demux_real.c,v 1.99 2004/05/27 11:10:13 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -785,6 +785,8 @@ static int demux_real_parse_references( demux_real_t *this) {
xine_event_t uevent;
+ lprintf("parsing references\n");
+
/* read file to memory.
* warning: dumb code, but hopefuly ok since reference file is small */
do {
@@ -803,6 +805,8 @@ static int demux_real_parse_references( demux_real_t *this) {
if(buf_used)
buf[buf_used] = '\0';
+
+ lprintf("received %d bytes [%s]\n", buf_used, buf);
for(i=0;i<buf_used;i++) {
@@ -825,6 +829,7 @@ static int demux_real_parse_references( demux_real_t *this) {
for(j=i; buf[j] && buf[j] != '"' && !isspace(buf[j]); j++ )
;
buf[j]='\0';
+ lprintf("reference [%s] found\n", &buf[i]);
uevent.type = XINE_EVENT_MRL_REFERENCE;
uevent.stream = this->stream;