]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/id3v2.c
Merge commit 'd16c8d28d4e2fca3af1054ffbf635c8cee755fc8'
[ffmpeg] / libavformat / id3v2.c
index dae4aeb7c94f180aadfd563ad93a9f7ed65d6bad..a8273e282c1dd99fd39dd1625b9fdc8c9e74a87d 100644 (file)
@@ -265,8 +265,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding,
     case ID3v2_ENCODING_UTF16BOM:
         if ((left -= 2) < 0) {
             av_log(s, AV_LOG_ERROR, "Cannot read BOM value, input too short\n");
-            avio_close_dyn_buf(dynbuf, dst);
-            av_freep(dst);
+            ffio_free_dyn_buf(&dynbuf);
+            *dst = NULL;
             return AVERROR_INVALIDDATA;
         }
         switch (avio_rb16(pb)) {
@@ -276,8 +276,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding,
             break;
         default:
             av_log(s, AV_LOG_ERROR, "Incorrect BOM value\n");
-            avio_close_dyn_buf(dynbuf, dst);
-            av_freep(dst);
+            ffio_free_dyn_buf(&dynbuf);
+            *dst = NULL;
             *maxread = left;
             return AVERROR_INVALIDDATA;
         }