aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-02-16 06:10:47 +0100
committerOnur Gündüz <ogunduz@gmail.com>2026-02-16 06:10:47 +0100
commit6f612c117d33c383d2ac37d258c3d90f10717998 (patch)
treea39da11df22ac2cdba3d5cdee2048aee8be12192
parentfacc870d1dfbe59867e48da07a5b88c42571ed1d (diff)
downloadmp4-6f612c117d33c383d2ac37d258c3d90f10717998.tar.gz
mp4-6f612c117d33c383d2ac37d258c3d90f10717998.zip
Update Reset method to clear error state in writer
-rw-r--r--writer.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/writer.go b/writer.go
index e4dd8cb..2e431ee 100644
--- a/writer.go
+++ b/writer.go
@@ -81,10 +81,11 @@ func (w *Writer) putFixedString(s string, length int) {
w.pos += length
}
-// Reset resets the writer position to 0.
+// Reset resets the writer position to 0 and clears any error state.
func (w *Writer) Reset() {
w.pos = 0
w.depth = 0
+ w.err = nil
}
// StartBox begins a new box. Write content, then call EndBox.