Mercurial > mplayer.hg
comparison loader/dshow/DS_AudioDecoder.c @ 9967:b0d1b415320c
cygwin support patch by Sascha Sommer and some fixes by me
author | alex |
---|---|
date | Mon, 21 Apr 2003 21:06:08 +0000 |
parents | f47d484d8f28 |
children | f70772d02eaa |
comparison
equal
deleted
inserted
replaced
9966:9aeb20839969 | 9967:b0d1b415320c |
---|---|
2 | 2 |
3 DirectShow audio decoder | 3 DirectShow audio decoder |
4 Copyright 2001 Eugene Kuznetsov (divx@euro.ru) | 4 Copyright 2001 Eugene Kuznetsov (divx@euro.ru) |
5 | 5 |
6 *********************************************************/ | 6 *********************************************************/ |
7 #include "config.h" | |
7 | 8 |
8 #ifndef NOAVIFILE_HEADERS | 9 #ifndef NOAVIFILE_HEADERS |
9 #include "audiodecoder.h" | 10 #include "audiodecoder.h" |
10 #include "except.h" | 11 #include "except.h" |
11 #else | 12 #else |
22 char* m_sVhdr; | 23 char* m_sVhdr; |
23 char* m_sVhdr2; | 24 char* m_sVhdr2; |
24 }; | 25 }; |
25 | 26 |
26 #include "DS_AudioDecoder.h" | 27 #include "DS_AudioDecoder.h" |
28 #ifdef WIN32_LOADER | |
27 #include "../ldt_keeper.h" | 29 #include "../ldt_keeper.h" |
30 #endif | |
28 | 31 |
29 #include <string.h> | 32 #include <string.h> |
30 #include <stdio.h> | 33 #include <stdio.h> |
31 #include <stdlib.h> | 34 #include <stdlib.h> |
32 | 35 |
39 { | 42 { |
40 DS_AudioDecoder *this; | 43 DS_AudioDecoder *this; |
41 int sz; | 44 int sz; |
42 WAVEFORMATEX* pWF; | 45 WAVEFORMATEX* pWF; |
43 | 46 |
47 #ifdef WIN32_LOADER | |
44 Setup_LDT_Keeper(); | 48 Setup_LDT_Keeper(); |
45 Setup_FS_Segment(); | 49 Setup_FS_Segment(); |
50 #endif | |
46 | 51 |
47 this = malloc(sizeof(DS_AudioDecoder)); | 52 this = malloc(sizeof(DS_AudioDecoder)); |
48 | 53 |
49 sz = 18 + wf->cbSize; | 54 sz = 18 + wf->cbSize; |
50 this->m_sVhdr = malloc(sz); | 55 this->m_sVhdr = malloc(sz); |
139 unsigned int read = 0; | 144 unsigned int read = 0; |
140 | 145 |
141 if (!in_data || !out_data) | 146 if (!in_data || !out_data) |
142 return -1; | 147 return -1; |
143 | 148 |
149 #ifdef WIN32_LOADER | |
144 Setup_FS_Segment(); | 150 Setup_FS_Segment(); |
151 #endif | |
145 | 152 |
146 in_size -= in_size%this->in_fmt.nBlockAlign; | 153 in_size -= in_size%this->in_fmt.nBlockAlign; |
147 while (in_size>0) | 154 while (in_size>0) |
148 { | 155 { |
149 unsigned int frame_size = 0; | 156 unsigned int frame_size = 0; |