aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index 732781a..5cdcab9 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -231,7 +231,11 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
231 { 231 {
232 try 232 try
233 { 233 {
234 List<int> layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(new MemoryStream(j2kData)); 234 List<int> layerStarts;
235 using (MemoryStream ms = new MemoryStream(j2kData))
236 {
237 layerStarts = CSJ2K.J2kImage.GetLayerBoundaries(ms);
238 }
235 239
236 if (layerStarts != null && layerStarts.Count > 0) 240 if (layerStarts != null && layerStarts.Count > 0)
237 { 241 {