git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0528adb
)
avformat/nutenc: don't allocate a dynamic AVIOContext if no index is going to be...
author
James Almer
<jamrial@gmail.com>
Fri, 18 Oct 2019 23:53:10 +0000
(20:53 -0300)
committer
James Almer
<jamrial@gmail.com>
Fri, 18 Oct 2019 23:53:10 +0000
(20:53 -0300)
Fixes ticket #8295
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/nutenc.c
patch
|
blob
|
history
diff --git
a/libavformat/nutenc.c
b/libavformat/nutenc.c
index
e9a3bb4
..
4d10e70
100644
(file)
--- a/
libavformat/nutenc.c
+++ b/
libavformat/nutenc.c
@@
-1170,8
+1170,11
@@
static int nut_write_trailer(AVFormatContext *s)
while (nut->header_count < 3)
write_headers(s, bc);
+ if (!nut->sp_count)
+ return 0;
+
ret = avio_open_dyn_buf(&dyn_bc);
- if (ret >= 0
&& nut->sp_count
) {
+ if (ret >= 0) {
av_assert1(nut->write_index); // sp_count should be 0 if no index is going to be written
write_index(nut, dyn_bc);
put_packet(nut, bc, dyn_bc, 1, INDEX_STARTCODE);