Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
46e97dc3
Commit
46e97dc3
authored
Apr 11, 2009
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reindent
Originally committed as revision 18429 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f772b7fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
electronicarts.c
libavformat/electronicarts.c
+22
-22
No files found.
libavformat/electronicarts.c
View file @
46e97dc3
...
...
@@ -472,26 +472,26 @@ static int ea_read_packet(AVFormatContext *s,
ret
=
av_get_packet
(
pb
,
pkt
,
chunk_size
);
if
(
ret
<
0
)
return
ret
;
pkt
->
stream_index
=
ea
->
audio_stream_index
;
pkt
->
pts
=
90000
;
pkt
->
pts
*=
ea
->
audio_frame_counter
;
pkt
->
pts
/=
ea
->
sample_rate
;
switch
(
ea
->
audio_codec
)
{
case
CODEC_ID_ADPCM_EA
:
/* 2 samples/byte, 1 or 2 samples per frame depending
* on stereo; chunk also has 12-byte header */
ea
->
audio_frame_counter
+=
((
chunk_size
-
12
)
*
2
)
/
ea
->
num_channels
;
break
;
case
CODEC_ID_PCM_S16LE_PLANAR
:
case
CODEC_ID_MP3
:
ea
->
audio_frame_counter
+=
num_samples
;
break
;
default:
ea
->
audio_frame_counter
+=
chunk_size
/
(
ea
->
bytes
*
ea
->
num_channels
);
}
pkt
->
stream_index
=
ea
->
audio_stream_index
;
pkt
->
pts
=
90000
;
pkt
->
pts
*=
ea
->
audio_frame_counter
;
pkt
->
pts
/=
ea
->
sample_rate
;
switch
(
ea
->
audio_codec
)
{
case
CODEC_ID_ADPCM_EA
:
/* 2 samples/byte, 1 or 2 samples per frame depending
* on stereo; chunk also has 12-byte header */
ea
->
audio_frame_counter
+=
((
chunk_size
-
12
)
*
2
)
/
ea
->
num_channels
;
break
;
case
CODEC_ID_PCM_S16LE_PLANAR
:
case
CODEC_ID_MP3
:
ea
->
audio_frame_counter
+=
num_samples
;
break
;
default:
ea
->
audio_frame_counter
+=
chunk_size
/
(
ea
->
bytes
*
ea
->
num_channels
);
}
packet_read
=
1
;
break
;
...
...
@@ -531,8 +531,8 @@ get_video_packet:
ret
=
av_get_packet
(
pb
,
pkt
,
chunk_size
);
if
(
ret
<
0
)
return
ret
;
pkt
->
stream_index
=
ea
->
video_stream_index
;
pkt
->
flags
|=
key
;
pkt
->
stream_index
=
ea
->
video_stream_index
;
pkt
->
flags
|=
key
;
packet_read
=
1
;
break
;
...
...
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