Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fa0f62c3
Commit
fa0f62c3
authored
Sep 10, 2003
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed invalid sequence end code
Originally committed as revision 2256 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
49057904
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
mpeg.c
libavformat/mpeg.c
+7
-12
No files found.
libavformat/mpeg.c
View file @
fa0f62c3
...
...
@@ -250,7 +250,7 @@ static int mpeg_mux_init(AVFormatContext *ctx)
}
/* flush the packet on stream stream_index */
static
void
flush_packet
(
AVFormatContext
*
ctx
,
int
stream_index
,
int
last_pkt
)
static
void
flush_packet
(
AVFormatContext
*
ctx
,
int
stream_index
)
{
MpegMuxContext
*
s
=
ctx
->
priv_data
;
StreamInfo
*
stream
=
ctx
->
streams
[
stream_index
]
->
priv_data
;
...
...
@@ -258,7 +258,6 @@ static void flush_packet(AVFormatContext *ctx, int stream_index, int last_pkt)
int
size
,
payload_size
,
startcode
,
id
,
len
,
stuffing_size
,
i
,
header_len
;
int64_t
timestamp
;
uint8_t
buffer
[
128
];
int
last
=
last_pkt
?
4
:
0
;
id
=
stream
->
id
;
timestamp
=
stream
->
start_pts
;
...
...
@@ -287,7 +286,7 @@ static void flush_packet(AVFormatContext *ctx, int stream_index, int last_pkt)
}
else
{
header_len
=
5
;
}
payload_size
=
s
->
packet_size
-
(
size
+
6
+
header_len
+
last
);
payload_size
=
s
->
packet_size
-
(
size
+
6
+
header_len
);
if
(
id
<
0xc0
)
{
startcode
=
PRIVATE_STREAM_1
;
payload_size
-=
4
;
...
...
@@ -327,9 +326,6 @@ static void flush_packet(AVFormatContext *ctx, int stream_index, int last_pkt)
}
}
if
(
last_pkt
)
{
put_be32
(
&
ctx
->
pb
,
ISO_11172_END_CODE
);
}
/* output data */
put_buffer
(
&
ctx
->
pb
,
stream
->
buffer
,
payload_size
-
stuffing_size
);
put_flush_packet
(
&
ctx
->
pb
);
...
...
@@ -370,7 +366,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, int stream_index,
/* output the packet */
if
(
stream
->
start_pts
==
-
1
)
stream
->
start_pts
=
pts
;
flush_packet
(
ctx
,
stream_index
,
0
);
flush_packet
(
ctx
,
stream_index
);
}
}
return
0
;
...
...
@@ -385,14 +381,13 @@ static int mpeg_mux_end(AVFormatContext *ctx)
for
(
i
=
0
;
i
<
ctx
->
nb_streams
;
i
++
)
{
stream
=
ctx
->
streams
[
i
]
->
priv_data
;
if
(
stream
->
buffer_ptr
>
0
)
{
if
(
i
==
(
ctx
->
nb_streams
-
1
))
flush_packet
(
ctx
,
i
,
1
);
else
flush_packet
(
ctx
,
i
,
0
);
flush_packet
(
ctx
,
i
);
}
}
/* write the end header */
/* End header according to MPEG1 systems standard. We do not write
it as it is usually not needed by decoders and because it
complicates MPEG stream concatenation. */
//put_be32(&ctx->pb, ISO_11172_END_CODE);
//put_flush_packet(&ctx->pb);
...
...
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