diff options
author | James Almer <jamrial@gmail.com> | 2021-01-30 15:04:24 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-03-17 15:06:48 -0300 |
commit | 9066969713e6a7bad0b76f1936ee60cac456bbe0 (patch) | |
tree | 9a3d8843d0ad25eed643f09645c4b613bfbfa41f /libavformat/options.c | |
parent | 2995a1f2944a61bd054ededd51688d99bef260ce (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.c | 6 |
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; |