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
1c6d2b7d
Commit
1c6d2b7d
authored
Mar 16, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: update AVStream.nb_frames when muxing.
parent
e98bc78c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
matroskaenc.c
libavformat/matroskaenc.c
+1
-1
utils.c
libavformat/utils.c
+7
-0
No files found.
libavformat/matroskaenc.c
View file @
1c6d2b7d
...
...
@@ -932,7 +932,7 @@ static int mkv_write_ass_blocks(AVFormatContext *s, AVIOContext *pb, AVPacket *p
size
-=
start
-
data
;
sscanf
(
data
,
"Dialogue: %d,"
,
&
layer
);
i
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"%"
PRId64
",%d,"
,
s
->
streams
[
pkt
->
stream_index
]
->
nb_frames
++
,
layer
);
s
->
streams
[
pkt
->
stream_index
]
->
nb_frames
,
layer
);
size
=
FFMIN
(
i
+
size
,
sizeof
(
buffer
));
memcpy
(
buffer
+
i
,
start
,
size
-
i
);
...
...
libavformat/utils.c
View file @
1c6d2b7d
...
...
@@ -3023,6 +3023,9 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
return
ret
;
ret
=
s
->
oformat
->
write_packet
(
s
,
pkt
);
if
(
ret
>=
0
)
s
->
streams
[
pkt
->
stream_index
]
->
nb_frames
++
;
return
ret
;
}
...
...
@@ -3143,6 +3146,8 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){
return
ret
;
ret
=
s
->
oformat
->
write_packet
(
s
,
&
opkt
);
if
(
ret
>=
0
)
s
->
streams
[
opkt
.
stream_index
]
->
nb_frames
++
;
av_free_packet
(
&
opkt
);
pkt
=
NULL
;
...
...
@@ -3165,6 +3170,8 @@ int av_write_trailer(AVFormatContext *s)
break
;
ret
=
s
->
oformat
->
write_packet
(
s
,
&
pkt
);
if
(
ret
>=
0
)
s
->
streams
[
pkt
.
stream_index
]
->
nb_frames
++
;
av_free_packet
(
&
pkt
);
...
...
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