summaryrefslogtreecommitdiff
path: root/libavformat/options.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-01-30 15:04:24 -0300
committerJames Almer <jamrial@gmail.com>2021-03-17 15:06:48 -0300
commit9066969713e6a7bad0b76f1936ee60cac456bbe0 (patch)
tree9a3d8843d0ad25eed643f09645c4b613bfbfa41f /libavformat/options.c
parent2995a1f2944a61bd054ededd51688d99bef260ce (diff)
avformat/mux: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/options.c')
-rw-r--r--libavformat/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/options.c b/libavformat/options.c
index 59e0389815..8d7c4fe4cb 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -220,6 +220,12 @@ AVFormatContext *avformat_alloc_context(void)
av_free(ic);
return NULL;
}
+ internal->pkt = av_packet_alloc();
+ if (!internal->pkt) {
+ av_free(internal);
+ av_free(ic);
+ return NULL;
+ }
avformat_get_context_defaults(ic);
ic->internal = internal;
ic->internal->offset = AV_NOPTS_VALUE;