Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
531ca620
Commit
531ca620
authored
Dec 04, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: Fix an other (and last ? ;) endian issue.
parent
7c80c87d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
36 deletions
+34
-36
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+7
-7
modules/demux/avi/libavi.c
modules/demux/avi/libavi.c
+25
-18
modules/demux/avi/libavi.h
modules/demux/avi/libavi.h
+2
-11
No files found.
modules/demux/avi/avi.c
View file @
531ca620
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.1
5 2002/12/03 17:00:16
fenrir Exp $
* $Id: avi.c,v 1.1
6 2002/12/04 15:47:31
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -939,16 +939,16 @@ static int AVIInit( vlc_object_t * p_this )
...
@@ -939,16 +939,16 @@ static int AVIInit( vlc_object_t * p_this )
p_info
->
i_cat
=
AUDIO_ES
;
p_info
->
i_cat
=
AUDIO_ES
;
p_info
->
i_fourcc
=
p_info
->
i_fourcc
=
AVI_FourccGetCodec
(
AUDIO_ES
,
AVI_FourccGetCodec
(
AUDIO_ES
,
p_avi_strf_auds
->
i_formatt
ag
);
p_avi_strf_auds
->
p_wf
->
wFormatT
ag
);
p_info
->
i_codec
=
p_info
->
i_fourcc
;
p_info
->
i_codec
=
p_info
->
i_fourcc
;
i_init_size
=
p_avi_strf_auds
->
i_chunk_size
;
i_init_size
=
p_avi_strf_auds
->
i_chunk_size
;
p_init_data
=
p_avi_strf_auds
->
p_wf
x
;
p_init_data
=
p_avi_strf_auds
->
p_wf
;
msg_Dbg
(
p_input
,
"stream[%d] audio(0x%x) %d channels %dHz %dbits"
,
msg_Dbg
(
p_input
,
"stream[%d] audio(0x%x) %d channels %dHz %dbits"
,
i
,
i
,
p_avi_strf_auds
->
i_formatt
ag
,
p_avi_strf_auds
->
p_wf
->
wFormatT
ag
,
p_avi_strf_auds
->
i_c
hannels
,
p_avi_strf_auds
->
p_wf
->
nC
hannels
,
p_avi_strf_auds
->
i_samplespers
ec
,
p_avi_strf_auds
->
p_wf
->
nSamplesPerS
ec
,
p_avi_strf_auds
->
i_bitspers
ample
);
p_avi_strf_auds
->
p_wf
->
wBitsPerS
ample
);
break
;
break
;
case
(
AVIFOURCC_vids
):
case
(
AVIFOURCC_vids
):
...
...
modules/demux/avi/libavi.c
View file @
531ca620
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* libavi.c :
* libavi.c :
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.
7 2002/11/08 10:26:53 gbazin
Exp $
* $Id: libavi.c,v 1.
8 2002/12/04 15:47:31 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -513,28 +513,35 @@ static int AVI_ChunkRead_strf( input_thread_t *p_input,
...
@@ -513,28 +513,35 @@ static int AVI_ChunkRead_strf( input_thread_t *p_input,
switch
(
p_strh
->
strh
.
i_type
)
switch
(
p_strh
->
strh
.
i_type
)
{
{
case
(
AVIFOURCC_auds
):
case
(
AVIFOURCC_auds
):
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
i_formattag
);
p_chk
->
strf
.
auds
.
p_wf
=
malloc
(
p_chk
->
common
.
i_chunk_size
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
i_channels
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
wFormatTag
);
AVI_READ4BYTES
(
p_chk
->
strf
.
auds
.
i_samplespersec
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nChannels
);
AVI_READ4BYTES
(
p_chk
->
strf
.
auds
.
i_avgbytespersec
);
AVI_READ4BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nSamplesPerSec
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
i_blockalign
);
AVI_READ4BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nAvgBytesPerSec
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
i_bitspersample
);
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
nBlockAlign
);
if
(
p_chk
->
strf
.
auds
.
i_formattag
!=
WAVE_FORMAT_PCM
)
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
wBitsPerSample
);
{
if
(
p_chk
->
strf
.
auds
.
p_wf
->
wFormatTag
!=
WAVE_FORMAT_PCM
)
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
i_size
);
{
}
AVI_READ2BYTES
(
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
);
p_chk
->
strf
.
auds
.
p_wfx
=
malloc
(
p_chk
->
common
.
i_chunk_size
);
}
memcpy
(
p_chk
->
strf
.
auds
.
p_wfx
,
else
p_buff
+
8
,
{
p_chk
->
common
.
i_chunk_size
);
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
=
0
;
}
if
(
p_chk
->
strf
.
auds
.
p_wf
->
cbSize
>
0
)
{
memcpy
(
&
p_chk
->
strf
.
auds
.
p_wf
[
1
]
,
p_buff
+
sizeof
(
WAVEFORMATEX
),
p_chk
->
common
.
i_chunk_size
-
sizeof
(
WAVEFORMATEX
));
}
#ifdef AVI_DEBUG
#ifdef AVI_DEBUG
msg_Dbg
(
p_input
,
msg_Dbg
(
p_input
,
"strf: audio:0x%4.4x channels:%d %dHz %dbits/sample %dkb/s"
,
"strf: audio:0x%4.4x channels:%d %dHz %dbits/sample %dkb/s"
,
p_chk
->
strf
.
auds
.
i_formatt
ag
,
p_chk
->
strf
.
auds
.
p_wf
->
wFormatT
ag
,
p_chk
->
strf
.
auds
.
i_c
hannels
,
p_chk
->
strf
.
auds
.
p_wf
->
nC
hannels
,
p_chk
->
strf
.
auds
.
i_samplespers
ec
,
p_chk
->
strf
.
auds
.
p_wf
->
nSamplesPerS
ec
,
p_chk
->
strf
.
auds
.
i_bitspers
ample
,
p_chk
->
strf
.
auds
.
p_wf
->
wBitsPerS
ample
,
p_chk
->
strf
.
auds
.
i_avgbytespers
ec
*
8
/
1024
);
p_chk
->
strf
.
auds
.
p_wf
->
nAvgBytesPerS
ec
*
8
/
1024
);
#endif
#endif
break
;
break
;
case
(
AVIFOURCC_vids
):
case
(
AVIFOURCC_vids
):
...
...
modules/demux/avi/libavi.h
View file @
531ca620
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* libavi.h : LibAVI library
* libavi.h : LibAVI library
******************************************************************************
******************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: libavi.h,v 1.
4 2002/11/06 14:44:30 sam
Exp $
* $Id: libavi.h,v 1.
5 2002/12/04 15:47:31 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
...
@@ -237,16 +237,7 @@ typedef struct avi_chunk_strh_s
...
@@ -237,16 +237,7 @@ typedef struct avi_chunk_strh_s
typedef
struct
avi_chunk_strf_auds_s
typedef
struct
avi_chunk_strf_auds_s
{
{
AVI_CHUNK_COMMON
AVI_CHUNK_COMMON
void
*
p_wfx
;
// waveformatex_t loaded from file
WAVEFORMATEX
*
p_wf
;
uint16_t
i_formattag
;
// + 0x00
uint16_t
i_channels
;
// + 0x02
uint32_t
i_samplespersec
;
// + 0x04
uint32_t
i_avgbytespersec
;
// + 0x08
uint16_t
i_blockalign
;
// + 0x0c
uint16_t
i_bitspersample
;
// + 0x0e
uint16_t
i_size
;
/* the extra size in bytes */
uint8_t
*
p_data
;
}
avi_chunk_strf_auds_t
;
}
avi_chunk_strf_auds_t
;
typedef
struct
avi_chunk_strf_vids_s
typedef
struct
avi_chunk_strf_vids_s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment