Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9ae84697
Commit
9ae84697
authored
Jan 23, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vqa: set packet duration.
Also remove unused context field, audio_frame_counter.
parent
53ed79a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
westwood_vqa.c
libavformat/westwood_vqa.c
+3
-5
No files found.
libavformat/westwood_vqa.c
View file @
9ae84697
...
...
@@ -61,8 +61,6 @@ typedef struct WsVqaDemuxContext {
int
audio_stream_index
;
int
video_stream_index
;
int64_t
audio_frame_counter
;
}
WsVqaDemuxContext
;
static
int
wsvqa_probe
(
AVProbeData
*
p
)
...
...
@@ -144,7 +142,6 @@ static int wsvqa_read_header(AVFormatContext *s,
wsvqa
->
audio_stream_index
=
st
->
index
;
wsvqa
->
audio_samplerate
=
st
->
codec
->
sample_rate
;
wsvqa
->
audio_channels
=
st
->
codec
->
channels
;
wsvqa
->
audio_frame_counter
=
0
;
}
/* there are 0 or more chunks before the FINF chunk; iterate until
...
...
@@ -216,13 +213,14 @@ static int wsvqa_read_packet(AVFormatContext *s,
if
(
chunk_type
==
SND2_TAG
)
{
pkt
->
stream_index
=
wsvqa
->
audio_stream_index
;
/* 2 samples/byte, 1 or 2 samples per frame depending on stereo */
wsvqa
->
audio_frame_counter
+
=
(
chunk_size
*
2
)
/
wsvqa
->
audio_channels
;
pkt
->
duration
=
(
chunk_size
*
2
)
/
wsvqa
->
audio_channels
;
}
else
if
(
chunk_type
==
SND1_TAG
)
{
pkt
->
stream_index
=
wsvqa
->
audio_stream_index
;
/* unpacked size is stored in header */
wsvqa
->
audio_frame_counter
+
=
AV_RL16
(
pkt
->
data
)
/
wsvqa
->
audio_channels
;
pkt
->
duration
=
AV_RL16
(
pkt
->
data
)
/
wsvqa
->
audio_channels
;
}
else
{
pkt
->
stream_index
=
wsvqa
->
video_stream_index
;
pkt
->
duration
=
1
;
}
/* stay on 16-bit alignment */
if
(
skip_byte
)
...
...
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