summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-24 12:50:17 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-30 16:12:22 +0200
commitf265374bc0b234fa26b744945d55981e8c6062d5 (patch)
tree5abec279acae6b5bffb489ff0eff7e627aec9154 /libavformat/utils.c
parent9abf0e0419c1ebfe6ba9075af0f032b6d45ef741 (diff)
avformat/utils: Remove always-false check
AVFormatContext.internal is already allocated by avformat_alloc_context() on success; and on error, avformat_alloc_context() cleans up manually without avformat_free_context(). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4caa3017fb..7d7fd16257 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1742,8 +1742,6 @@ return_packet:
/* XXX: suppress the packet queue */
static void flush_packet_queue(AVFormatContext *s)
{
- if (!s->internal)
- return;
avpriv_packet_list_free(&s->internal->parse_queue, &s->internal->parse_queue_end);
avpriv_packet_list_free(&s->internal->packet_buffer, &s->internal->packet_buffer_end);
avpriv_packet_list_free(&s->internal->raw_packet_buffer, &s->internal->raw_packet_buffer_end);