Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
22cdb37f
Commit
22cdb37f
authored
Mar 23, 2005
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/mux/mpeg/ts.c, modules/demux/ts.c: Fixed IOD descriptor
(patch courtesy of Nico Sabbi)
parent
c47f3efc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
8 deletions
+32
-8
modules/demux/ts.c
modules/demux/ts.c
+24
-7
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+8
-1
No files found.
modules/demux/ts.c
View file @
22cdb37f
...
@@ -175,7 +175,7 @@ typedef struct
...
@@ -175,7 +175,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
uint8_t
i_iod_label
;
uint8_t
i_iod_label
,
i_iod_label_scope
;
/* IOD */
/* IOD */
uint16_t
i_od_id
;
uint16_t
i_od_id
;
...
@@ -410,7 +410,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -410,7 +410,7 @@ static int Open( vlc_object_t *p_this )
/* Read config */
/* Read config */
var_Create
(
p_demux
,
"ts-es-id-pid"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_demux
,
"ts-es-id-pid"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_demux
,
"ts-es-id-pid"
,
&
val
);
var_Get
(
p_demux
,
"ts-es-id-pid"
,
&
val
);
p_sys
->
b_es_id_pid
=
val
.
b_bool
,
p_sys
->
b_es_id_pid
=
val
.
b_bool
;
var_Create
(
p_demux
,
"ts-out"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_demux
,
"ts-out"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_demux
,
"ts-out"
,
&
val
);
var_Get
(
p_demux
,
"ts-out"
,
&
val
);
...
@@ -1626,7 +1626,7 @@ static iod_descriptor_t *IODNew( int i_data, uint8_t *p_data )
...
@@ -1626,7 +1626,7 @@ static iod_descriptor_t *IODNew( int i_data, uint8_t *p_data )
iod_descriptor_t
*
p_iod
;
iod_descriptor_t
*
p_iod
;
int
i
;
int
i
;
int
i_es_index
;
int
i_es_index
;
uint8_t
i_flags
;
uint8_t
i_flags
,
i_iod_tag
,
byte1
,
byte2
,
byte3
;
vlc_bool_t
b_url
;
vlc_bool_t
b_url
;
int
i_iod_length
;
int
i_iod_length
;
...
@@ -1645,14 +1645,28 @@ static iod_descriptor_t *IODNew( int i_data, uint8_t *p_data )
...
@@ -1645,14 +1645,28 @@ static iod_descriptor_t *IODNew( int i_data, uint8_t *p_data )
return
p_iod
;
return
p_iod
;
}
}
p_iod
->
i_iod_label
=
IODGetByte
(
&
i_data
,
&
p_data
);
byte1
=
IODGetByte
(
&
i_data
,
&
p_data
);
byte2
=
IODGetByte
(
&
i_data
,
&
p_data
);
byte3
=
IODGetByte
(
&
i_data
,
&
p_data
);
if
(
byte2
==
0x02
)
//old vlc's buggy implementation of the IOD_descriptor
{
p_iod
->
i_iod_label_scope
=
0x11
;
p_iod
->
i_iod_label
=
byte1
;
i_iod_tag
=
byte2
;
}
else
//correct implementation of the IOD_descriptor
{
p_iod
->
i_iod_label_scope
=
byte1
;
p_iod
->
i_iod_label
=
byte2
;
i_iod_tag
=
byte3
;
}
fprintf
(
stderr
,
"
\n
* iod_label:%d"
,
p_iod
->
i_iod_label
);
fprintf
(
stderr
,
"
\n
* iod_label:%d"
,
p_iod
->
i_iod_label
);
fprintf
(
stderr
,
"
\n
* ==========="
);
fprintf
(
stderr
,
"
\n
* ==========="
);
fprintf
(
stderr
,
"
\n
* tag:0x%x"
,
p_data
[
0
]
);
fprintf
(
stderr
,
"
\n
* tag:0x%x"
,
i_iod_tag
);
if
(
IODGetByte
(
&
i_data
,
&
p_data
)
!=
0x02
)
if
(
i_iod_tag
!=
0x02
)
{
{
fprintf
(
stderr
,
"
\n
ERR: tag
!= 0x02"
);
fprintf
(
stderr
,
"
\n
ERR: tag
%02x != 0x02"
,
i_iod_tag
);
return
p_iod
;
return
p_iod
;
}
}
...
@@ -2112,6 +2126,9 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
...
@@ -2112,6 +2126,9 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
case
0x20
:
/* mpeg4 */
case
0x20
:
/* mpeg4 */
pid
->
es
->
fmt
.
i_codec
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'v'
);
pid
->
es
->
fmt
.
i_codec
=
VLC_FOURCC
(
'm'
,
'p'
,
'4'
,
'v'
);
break
;
break
;
case
0x21
:
/* h264 */
pid
->
es
->
fmt
.
i_codec
=
VLC_FOURCC
(
'h'
,
'2'
,
'6'
,
'4'
);
break
;
case
0x60
:
case
0x60
:
case
0x61
:
case
0x61
:
case
0x62
:
case
0x62
:
...
...
modules/mux/mpeg/ts.c
View file @
22cdb37f
...
@@ -1790,6 +1790,8 @@ static void GetPMT( sout_mux_t *p_mux,
...
@@ -1790,6 +1790,8 @@ static void GetPMT( sout_mux_t *p_mux,
memset
(
iod
,
0
,
4096
);
memset
(
iod
,
0
,
4096
);
bits_initwrite
(
&
bits
,
4096
,
iod
);
bits_initwrite
(
&
bits
,
4096
,
iod
);
// IOD_label_scope
bits_write
(
&
bits
,
8
,
0x11
);
// IOD_label
// IOD_label
bits_write
(
&
bits
,
8
,
0x01
);
bits_write
(
&
bits
,
8
,
0x01
);
// InitialObjectDescriptor
// InitialObjectDescriptor
...
@@ -1839,7 +1841,12 @@ static void GetPMT( sout_mux_t *p_mux,
...
@@ -1839,7 +1841,12 @@ static void GetPMT( sout_mux_t *p_mux,
bits_write
(
&
bits
,
8
,
0x20
);
// Visual 14496-2
bits_write
(
&
bits
,
8
,
0x20
);
// Visual 14496-2
bits_write
(
&
bits
,
6
,
0x04
);
// VisualStream
bits_write
(
&
bits
,
6
,
0x04
);
// VisualStream
}
}
else
if
(
p_stream
->
i_stream_type
==
0x11
)
else
if
(
p_stream
->
i_stream_type
==
0x1b
)
{
bits_write
(
&
bits
,
8
,
0x21
);
// Visual 14496-2
bits_write
(
&
bits
,
6
,
0x04
);
// VisualStream
}
else
if
(
p_stream
->
i_stream_type
==
0x11
||
p_stream
->
i_stream_type
==
0x0f
)
{
{
bits_write
(
&
bits
,
8
,
0x40
);
// Audio 14496-3
bits_write
(
&
bits
,
8
,
0x40
);
// Audio 14496-3
bits_write
(
&
bits
,
6
,
0x05
);
// AudioStream
bits_write
(
&
bits
,
6
,
0x05
);
// AudioStream
...
...
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