Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
1d7d6338
Commit
1d7d6338
authored
Apr 24, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mp4: select only first enabled track.
parent
dbdf9101
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+16
-5
No files found.
modules/demux/mp4/mp4.c
View file @
1d7d6338
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.2
4 2003/04/22 16:28:24
fenrir Exp $
* $Id: mp4.c,v 1.2
5 2003/04/24 14:39:53
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -112,6 +112,8 @@ static int MP4Init( vlc_object_t * p_this )
MP4_Box_t
*
p_trak
;
unsigned
int
i
;
vlc_bool_t
b_audio
;
/* I need to seek */
if
(
!
p_input
->
stream
.
b_seekable
)
{
...
...
@@ -382,13 +384,22 @@ static int MP4Init( vlc_object_t * p_this )
}
for
(
i
=
0
;
i
<
p_demux
->
i_tracks
;
i
++
)
for
(
i
=
0
,
b_audio
=
VLC_FALSE
;
i
<
p_demux
->
i_tracks
;
i
++
)
{
#define track p_demux->track[i]
/* start decoder for this track if enable by default*/
if
(
p_demux
->
track
[
i
].
b_ok
&&
p_demux
->
track
[
i
].
b_enable
)
if
(
track
.
b_ok
&&
track
.
b_enable
&&
(
track
.
i_cat
!=
AUDIO_ES
||
!
b_audio
)
)
{
MP4_TrackSelect
(
p_input
,
&
p_demux
->
track
[
i
],
0
);
if
(
!
MP4_TrackSelect
(
p_input
,
&
track
,
0
)
)
{
if
(
track
.
i_cat
==
AUDIO_ES
)
{
b_audio
=
VLC_TRUE
;
}
}
}
#undef track
}
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
...
@@ -1362,7 +1373,7 @@ static int TrackGotoChunkSample( input_thread_t *p_input,
p_track
->
i_chunk
=
i_chunk
;
p_track
->
i_sample
=
i_sample
;
return
(
VLC_SUCCESS
);
return
(
p_track
->
b_selected
?
VLC_SUCCESS
:
VLC_EGENERIC
);
}
/****************************************************************************
...
...
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