Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
05edc1a7
Commit
05edc1a7
authored
18 years ago
by
Baptiste Coudurier
Browse files
Options
Downloads
Patches
Plain Diff
export all tracks to libavformat layer
Originally committed as revision 5482 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5e1d2731
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/mov.c
+15
-31
15 additions, 31 deletions
libavformat/mov.c
with
15 additions
and
31 deletions
libavformat/mov.c
+
15
−
31
View file @
05edc1a7
...
@@ -66,11 +66,6 @@
...
@@ -66,11 +66,6 @@
/* Allows seeking */
/* Allows seeking */
#define MOV_SEEK
#define MOV_SEEK
/* some streams in QT (and in MP4 mostly) aren't either video nor audio */
/* so we first list them as this, then clean up the list of streams we give back, */
/* getting rid of these */
#define CODEC_TYPE_MOV_OTHER (enum CodecType) 2
/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */
const
CodecTag
ff_mov_obj_type
[]
=
{
const
CodecTag
ff_mov_obj_type
[]
=
{
{
CODEC_ID_MPEG4
,
32
},
{
CODEC_ID_MPEG4
,
32
},
...
@@ -1361,7 +1356,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
...
@@ -1361,7 +1356,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
sc
->
sample_to_chunk_index
=
-
1
;
sc
->
sample_to_chunk_index
=
-
1
;
st
->
priv_data
=
sc
;
st
->
priv_data
=
sc
;
st
->
codec
->
codec_type
=
CODEC_TYPE_
MOV_OTHER
;
st
->
codec
->
codec_type
=
CODEC_TYPE_
DATA
;
st
->
start_time
=
0
;
/* XXX: check */
st
->
start_time
=
0
;
/* XXX: check */
c
->
streams
[
c
->
fc
->
nb_streams
-
1
]
=
sc
;
c
->
streams
[
c
->
fc
->
nb_streams
-
1
]
=
sc
;
...
@@ -1663,7 +1658,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -1663,7 +1658,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
{
{
MOVContext
*
mov
=
(
MOVContext
*
)
s
->
priv_data
;
MOVContext
*
mov
=
(
MOVContext
*
)
s
->
priv_data
;
ByteIOContext
*
pb
=
&
s
->
pb
;
ByteIOContext
*
pb
=
&
s
->
pb
;
int
i
,
j
,
err
;
int
i
,
err
;
MOV_atom_t
atom
=
{
0
,
0
,
0
};
MOV_atom_t
atom
=
{
0
,
0
,
0
};
mov
->
fc
=
s
;
mov
->
fc
=
s
;
...
@@ -1688,34 +1683,23 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -1688,34 +1683,23 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap)
url_fseek
(
pb
,
mov
->
mdat_offset
,
SEEK_SET
);
url_fseek
(
pb
,
mov
->
mdat_offset
,
SEEK_SET
);
mov
->
next_chunk_offset
=
mov
->
mdat_offset
;
/* initialise reading */
mov
->
next_chunk_offset
=
mov
->
mdat_offset
;
/* initialise reading */
mov
->
total_streams
=
s
->
nb_streams
;
for
(
i
=
0
;
i
<
s
->
nb
_streams
;)
{
for
(
i
=
0
;
i
<
mov
->
total
_streams
;
i
++
)
{
MOVStreamContext
*
sc
=
(
MOVStreamContext
*
)
s
->
streams
[
i
]
->
priv_data
;
MOVStreamContext
*
sc
=
mov
->
streams
[
i
];
if
(
s
->
streams
[
i
]
->
codec
->
codec_type
==
CODEC_TYPE_MOV_OTHER
)
{
/* not audio, not video, delete */
if
(
!
sc
->
time_rate
)
av_free
(
s
->
streams
[
i
]);
sc
->
time_rate
=
1
;
mov_free_stream_context
(
sc
);
if
(
!
sc
->
time_scale
)
for
(
j
=
i
+
1
;
j
<
s
->
nb_streams
;
j
++
)
{
sc
->
time_scale
=
mov
->
time_scale
;
s
->
streams
[
j
-
1
]
=
s
->
streams
[
j
];
av_set_pts_info
(
s
->
streams
[
i
],
64
,
sc
->
time_rate
,
sc
->
time_scale
);
mov
->
streams
[
j
-
1
]
=
mov
->
streams
[
j
];
}
if
(
s
->
streams
[
i
]
->
duration
!=
AV_NOPTS_VALUE
){
s
->
nb_streams
--
;
assert
(
s
->
streams
[
i
]
->
duration
%
sc
->
time_rate
==
0
);
}
else
{
s
->
streams
[
i
]
->
duration
/=
sc
->
time_rate
;
if
(
!
sc
->
time_rate
)
sc
->
time_rate
=
1
;
if
(
!
sc
->
time_scale
)
sc
->
time_scale
=
mov
->
time_scale
;
av_set_pts_info
(
s
->
streams
[
i
],
64
,
sc
->
time_rate
,
sc
->
time_scale
);
if
(
s
->
streams
[
i
]
->
duration
!=
AV_NOPTS_VALUE
){
assert
(
s
->
streams
[
i
]
->
duration
%
sc
->
time_rate
==
0
);
s
->
streams
[
i
]
->
duration
/=
sc
->
time_rate
;
}
sc
->
ffindex
=
i
;
i
++
;
}
}
sc
->
ffindex
=
i
;
}
}
mov
->
total_streams
=
s
->
nb_streams
;
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment