Skip to content

Commit

Permalink
Fixed computation of the encoded length in MJpegWpfVideoEncoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
baSSiLL committed Jan 24, 2022
1 parent c2c781b commit b5451f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SharpAvi/Codecs/MJpegWpfVideoEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public int EncodeFrame(byte[] source, int srcOffset, byte[] destination, int des
stream.Position = destOffset;
encoderImpl.Save(stream);
stream.Flush();
length = (int)stream.Length - destOffset;
length = (int)stream.Position - destOffset;
}

isKeyFrame = true;
Expand Down

0 comments on commit b5451f1

Please sign in to comment.