]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/aviobuf.c
AAC encoder: various fixes in M/S coding
[ffmpeg] / libavformat / aviobuf.c
index 57cbf8311ded2299d1f484f8c371735893ed1f76..b56d113e02883c95d6f29ad5388332a5017eb13a 100644 (file)
@@ -361,6 +361,8 @@ static inline int put_str16(AVIOContext *s, const char *str, const int be)
 invalid:
         av_log(s, AV_LOG_ERROR, "Invaid UTF8 sequence in avio_put_str16%s\n", be ? "be" : "le");
         err = AVERROR(EINVAL);
+        if (!*(q-1))
+            break;
     }
     if (be)
         avio_wb16(s, 0);