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
11f16b66
Commit
11f16b66
authored
Dec 16, 2007
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicate field
Originally committed as revision 11240 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
03dc32f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
mov.c
libavformat/mov.c
+6
-9
No files found.
libavformat/mov.c
View file @
11f16b66
...
...
@@ -116,7 +116,6 @@ typedef struct MOVContext {
int
found_moov
;
/* when both 'moov' and 'mdat' sections has been found */
int
found_mdat
;
/* we suppose we have enough data to read the file */
int64_t
mdat_offset
;
int
total_streams
;
MOVStreamContext
*
streams
[
MAX_STREAMS
];
AVPaletteControl
palette_control
;
MOV_mdat_t
*
mdat_list
;
...
...
@@ -1365,7 +1364,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
chunk_size
=
chunk_samples
*
sc
->
bytes_per_frame
/
sc
->
samples_per_frame
;
else
{
/* workaround to find nearest next chunk offset */
chunk_size
=
INT_MAX
;
for
(
j
=
0
;
j
<
mov
->
total
_streams
;
j
++
)
{
for
(
j
=
0
;
j
<
mov
->
fc
->
nb
_streams
;
j
++
)
{
MOVStreamContext
*
msc
=
mov
->
streams
[
j
];
for
(
k
=
msc
->
next_chunk
;
k
<
msc
->
chunk_count
;
k
++
)
{
if
(
msc
->
chunk_offsets
[
k
]
>
current_offset
&&
msc
->
chunk_offsets
[
k
]
-
current_offset
<
chunk_size
)
{
...
...
@@ -1384,7 +1383,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
chunk_size
=
mov
->
mdat_list
[
j
].
offset
+
mov
->
mdat_list
[
j
].
size
-
current_offset
;
}
assert
(
chunk_size
!=
INT_MAX
);
for
(
j
=
0
;
j
<
mov
->
total
_streams
;
j
++
)
{
for
(
j
=
0
;
j
<
mov
->
fc
->
nb
_streams
;
j
++
)
{
mov
->
streams
[
j
]
->
next_chunk
=
0
;
}
}
...
...
@@ -1438,9 +1437,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
dprintf
(
mov
->
fc
,
"on_parse_exit_offset=%d
\n
"
,
(
int
)
url_ftell
(
pb
));
mov
->
total_streams
=
s
->
nb_streams
;
for
(
i
=
0
;
i
<
mov
->
total_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
MOVStreamContext
*
sc
=
mov
->
streams
[
i
];
AVStream
*
st
=
s
->
streams
[
i
];
/* sanity checks */
...
...
@@ -1467,7 +1464,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
mov_build_index
(
mov
,
st
);
}
for
(
i
=
0
;
i
<
mov
->
total
_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb
_streams
;
i
++
)
{
/* Do not need those anymore. */
av_freep
(
&
mov
->
streams
[
i
]
->
chunk_offsets
);
av_freep
(
&
mov
->
streams
[
i
]
->
sample_to_chunk
);
...
...
@@ -1487,7 +1484,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
int64_t
best_dts
=
INT64_MAX
;
int
i
;
for
(
i
=
0
;
i
<
mov
->
total
_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb
_streams
;
i
++
)
{
MOVStreamContext
*
msc
=
mov
->
streams
[
i
];
if
(
s
->
streams
[
i
]
->
discard
!=
AVDISCARD_ALL
&&
msc
->
current_sample
<
msc
->
sample_count
)
{
AVIndexEntry
*
current_sample
=
&
s
->
streams
[
i
]
->
index_entries
[
msc
->
current_sample
];
...
...
@@ -1607,7 +1604,7 @@ static int mov_read_close(AVFormatContext *s)
{
int
i
;
MOVContext
*
mov
=
s
->
priv_data
;
for
(
i
=
0
;
i
<
mov
->
total
_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
s
->
nb
_streams
;
i
++
)
{
av_freep
(
&
mov
->
streams
[
i
]
->
ctts_data
);
av_freep
(
&
mov
->
streams
[
i
]);
}
...
...
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