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
f64ddfd9
Commit
f64ddfd9
authored
Jan 13, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mp4: convert 3 bytes codes into language (track name).
parent
22bf3807
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+27
-2
No files found.
modules/demux/mp4/mp4.c
View file @
f64ddfd9
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.5
1 2004/01/13 01:44:49
fenrir Exp $
* $Id: mp4.c,v 1.5
2 2004/01/13 01:54:54
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -28,6 +28,7 @@
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc_playlist.h>
#include "iso_lang.h"
#include "libmp4.h"
#include "mp4.h"
...
...
@@ -71,6 +72,8 @@ static uint64_t MP4_GetTrackPos ( track_data_mp4_t * );
static
int
MP4_TrackSampleSize
(
track_data_mp4_t
*
);
static
int
MP4_TrackNextSample
(
input_thread_t
*
,
track_data_mp4_t
*
);
static
char
*
LanguageGetName
(
const
char
*
psz_code
);
#define FREE( p ) \
if( p ) { free( p ); (p) = NULL;}
...
...
@@ -1344,7 +1347,7 @@ static void MP4_TrackCreate( input_thread_t *p_input,
/* Set language */
if
(
strcmp
(
language
,
"```"
)
&&
strcmp
(
language
,
"und"
)
)
{
p_track
->
fmt
.
psz_language
=
strdup
(
language
);
p_track
->
fmt
.
psz_language
=
LanguageGetName
(
language
);
}
/* fxi i_timescale for AUDIO_ES with i_qt_version == 0 */
...
...
@@ -1680,3 +1683,25 @@ static int MP4_TrackNextSample( input_thread_t *p_input,
}
static
char
*
LanguageGetName
(
const
char
*
psz_code
)
{
const
iso639_lang_t
*
pl
;
pl
=
GetLang_2B
(
psz_code
);
if
(
!
strcmp
(
pl
->
psz_iso639_1
,
"??"
)
)
{
pl
=
GetLang_2T
(
psz_code
);
}
if
(
!
strcmp
(
pl
->
psz_iso639_1
,
"??"
)
)
{
return
strdup
(
psz_code
);
}
if
(
*
pl
->
psz_native_name
)
{
return
strdup
(
pl
->
psz_native_name
);
}
return
strdup
(
pl
->
psz_eng_name
);
}
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