Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
74e8f4f6
Commit
74e8f4f6
authored
Nov 10, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: fix a bug in packet parsing and can now play unseekable stream.
parent
107a73f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
13 deletions
+42
-13
modules/demux/asf/asf.c
modules/demux/asf/asf.c
+7
-5
modules/demux/asf/libasf.c
modules/demux/asf/libasf.c
+35
-8
No files found.
modules/demux/asf/asf.c
View file @
74e8f4f6
...
...
@@ -2,7 +2,7 @@
* asf.c : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.c,v 1.
3 2002/10/28 11:49:57
fenrir Exp $
* $Id: asf.c,v 1.
4 2002/11/10 16:31:20
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -432,8 +432,10 @@ static int Demux( input_thread_t *p_input )
i_packet_send_time
=
GetDWLE
(
p_peek
+
i_skip
);
i_skip
+=
4
;
i_packet_duration
=
GetWLE
(
p_peek
+
i_skip
);
i_skip
+=
2
;
i_packet_size_left
=
i_packet_length
;
// XXX donnes reellement lu
// i_packet_size_left = i_packet_length; // XXX donnes reellement lu
/* FIXME I have to do that for some file, I don't known why */
i_packet_size_left
=
i_data_packet_min
;
if
(
b_packet_multiple_payload
)
{
i_payload_count
=
p_peek
[
i_skip
]
&
0x3f
;
...
...
@@ -495,6 +497,7 @@ static int Demux( input_thread_t *p_input )
i_media_object_offset
=
i_tmp
;
}
i_pts
=
__MAX
(
i_pts
-
p_demux
->
p_fp
->
i_preroll
*
1000
,
0
);
if
(
b_packet_multiple_payload
)
{
...
...
@@ -632,7 +635,6 @@ loop_error_recovery:
ASF_SkipBytes
(
p_input
,
i_data_packet_min
);
}
// loop over packet
p_demux
->
i_time
=
0
;
for
(
i
=
0
;
i
<
128
;
i
++
)
{
...
...
@@ -643,7 +645,7 @@ loop_error_recovery:
}
#undef p_stream
}
return
(
1
);
}
...
...
modules/demux/asf/libasf.c
View file @
74e8f4f6
...
...
@@ -2,7 +2,7 @@
* libasf.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libasf.c,v 1.
4 2002/11/08 10:26:53 gbazin
Exp $
* $Id: libasf.c,v 1.
5 2002/11/10 16:31:20 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -110,18 +110,45 @@ int ASF_SeekAbsolute( input_thread_t *p_input,
{
off_t
i_filepos
;
if
(
i_pos
>=
p_input
->
stream
.
p_selected_area
->
i_size
)
i_filepos
=
ASF_TellAbsolute
(
p_input
);
if
(
i_pos
==
i_filepos
)
{
return
(
0
);
return
(
1
);
}
i
_filepos
=
ASF_TellAbsolute
(
p_input
);
if
(
i_pos
!=
i_filepos
)
i
f
(
p_input
->
stream
.
b_seekable
&&
p_input
->
stream
.
i_method
!=
INPUT_METHOD_NETWORK
)
{
p_input
->
pf_seek
(
p_input
,
i_pos
);
input_AccessReinit
(
p_input
);
return
(
1
);
}
return
(
1
);
else
if
(
i_pos
>
i_filepos
)
{
u64
i_size
=
i_pos
-
i_filepos
;
do
{
data_packet_t
*
p_data
;
int
i_read
;
i_read
=
input_SplitBuffer
(
p_input
,
&
p_data
,
__MIN
(
i_size
,
1024
)
);
if
(
i_read
<=
0
)
{
return
(
0
);
}
input_DeletePacket
(
p_input
->
p_method_data
,
p_data
);
i_size
-=
i_read
;
}
while
(
i_size
>
0
);
return
(
1
);
}
else
{
msg_Err
(
p_input
,
"cannot seek"
);
return
(
0
);
}
}
/* return 1 if success, 0 if fail */
...
...
@@ -203,7 +230,7 @@ int ASF_NextObject( input_thread_t *p_input,
{
return
(
0
);
/* failed */
}
if
(
p_obj
->
common
.
p_father
)
if
(
p_obj
->
common
.
p_father
&&
p_obj
->
common
.
p_father
->
common
.
i_object_size
!=
0
)
{
if
(
p_obj
->
common
.
p_father
->
common
.
i_object_pos
+
p_obj
->
common
.
p_father
->
common
.
i_object_size
<
p_obj
->
common
.
i_object_pos
+
p_obj
->
common
.
i_object_size
+
24
)
...
...
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