summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_avi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers/demux_avi.c')
-rw-r--r--src/demuxers/demux_avi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index c6a73ebde..27dfce443 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -1871,7 +1871,12 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
if (!this->avi->bih->biCompression)
this->avi->video_type = BUF_VIDEO_RGB;
else
+ {
this->avi->video_type = _x_fourcc_to_buf_video(this->avi->bih->biCompression);
+ if (!this->avi->video_type)
+ _x_report_video_fourcc (this->stream->xine, LOG_MODULE,
+ this->avi->bih->biCompression);
+ }
for(i=0; i < this->avi->n_audio; i++) {
this->avi->audio[i]->audio_type = _x_formattag_to_buf_audio (this->avi->audio[i]->wavex->wFormatTag);
@@ -1884,10 +1889,10 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
}
if( !this->avi->audio[i]->audio_type ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "unknown audio type 0x%x\n",
- this->avi->audio[i]->wavex->wFormatTag);
this->no_audio = 1;
this->avi->audio[i]->audio_type = BUF_AUDIO_UNKNOWN;
+ _x_report_audio_format_tag (this->stream->xine, LOG_MODULE,
+ this->avi->audio[i]->wavex->wFormatTag);
} else
xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "demux_avi: audio type %s (wFormatTag 0x%x)\n",
_x_buf_audio_name(this->avi->audio[i]->audio_type),
@@ -1899,8 +1904,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
* 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 ) {
+ if( this->avi->video_type == BUF_VIDEO_MPEG4 &&
+ _x_fourcc_to_buf_video(this->avi->compressor) == BUF_VIDEO_XVID ) {
this->avi->bih->biCompression = this->avi->compressor;
this->avi->video_type = BUF_VIDEO_XVID;
}
@@ -1949,6 +1954,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
this->avi->compressor = this->avi->bih->biCompression;
} else {
this->avi->video_type = _x_fourcc_to_buf_video(this->avi->compressor);
+ if (!this->avi->video_type)
+ _x_fourcc_to_buf_video(this->avi->bih->biCompression);
}
_x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,