From bc5fa90168458712cc2c7a47216ebe6351e01cc0 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Thu, 29 May 2003 16:22:09 +0000 Subject: stream header fourcc is optional so read fourcc for stream info from bitmap info CVS patchset: 4983 CVS date: 2003/05/29 16:22:09 --- src/demuxers/demux_avi.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 92ffcccd8..0cf9d1185 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_avi.c,v 1.155 2003/04/26 20:15:56 guenter Exp $ + * $Id: demux_avi.c,v 1.156 2003/05/29 16:22:09 jstembridge Exp $ * * demultiplexer for avi streams * @@ -1424,11 +1424,15 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) { buf->size = this->avi->bih->biSize; this->avi->video_type = fourcc_to_buf_video(this->avi->bih->biCompression); - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = *(uint32_t *)this->avi->compressor; - - if (!this->avi->video_type) + + if (this->avi->video_type) { + memcpy(this->avi->compressor, &this->avi->bih->biCompression, 4); + this->avi->compressor[4] = 0; + } else this->avi->video_type = fourcc_to_buf_video(*(uint32_t *)this->avi->compressor); + this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = *(uint32_t *) this->avi->compressor; + if (!this->avi->video_type) { printf ("demux_avi: unknown video codec '%.4s'\n", -- cgit v1.2.3