diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-11-26 04:40:29 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-03-30 06:40:50 +0200 |
commit | 5d24b6843ca548508187d48bf587ae5ecbcffd57 (patch) | |
tree | 6d86a5f68e601e349cc1b17c62a47ee134b1657a /libavformat/matroskaenc.c | |
parent | 907b7f88ca81bad3edf6236a8ffd2b2431694376 (diff) | |
download | ffmpeg-5d24b6843ca548508187d48bf587ae5ecbcffd57.tar.gz |
avformat/matroskaenc: Check that Cluster has been opened
before setting the field indicating that a Cluster has been opened.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 1491010bcc..5dae53026d 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -2311,10 +2311,10 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt, int add_ } if (mkv->cluster_pos == -1) { - mkv->cluster_pos = avio_tell(s->pb); ret = start_ebml_master_crc32(&mkv->cluster_bc, mkv); if (ret < 0) return ret; + mkv->cluster_pos = avio_tell(s->pb); put_ebml_uint(mkv->cluster_bc, MATROSKA_ID_CLUSTERTIMECODE, FFMAX(0, ts)); mkv->cluster_pts = FFMAX(0, ts); av_log(s, AV_LOG_DEBUG, |