Message ID | 1588173257-14531-5-git-send-email-lance.lmwang@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/5] avformat/dashenc: fix invalid pointer access if avio_get_dyn_buf failed | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 1a97e7c883..ad04143f14 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -5252,9 +5252,9 @@ static int mov_flush_fragment(AVFormatContext *s, int force) } if ((buf_size = avio_get_dyn_buf(mov->mdat_buf, &buf)) > 0) { - avio_wb32(s->pb, buf_size + 8); - ffio_wfourcc(s->pb, "mdat"); - avio_write(s->pb, buf, buf_size); + avio_wb32(s->pb, buf_size + 8); + ffio_wfourcc(s->pb, "mdat"); + avio_write(s->pb, buf, buf_size); } ffio_free_dyn_buf(&mov->mdat_buf);