avformat/libsrt: fix for the memory leak if passphrase has been configured by option

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/333/head
Limin Wang 5 years ago committed by Michael Niedermayer
parent 648b8cca6c
commit f9d6addd60
  1. 1
      libavformat/libsrt.c

@ -494,6 +494,7 @@ static int libsrt_open(URLContext *h, const char *uri, int flags)
s->pbkeylen = strtol(buf, NULL, 10);
}
if (av_find_info_tag(buf, sizeof(buf), "passphrase", p)) {
av_freep(&s->passphrase);
s->passphrase = av_strndup(buf, strlen(buf));
}
if (av_find_info_tag(buf, sizeof(buf), "mss", p)) {

Loading…
Cancel
Save