react-native-video-trim 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,7 +72,7 @@ public class VideoTrimmerUtil {
72
72
  retriever.setDataSource(inputFile);
73
73
  String rotationStr = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
74
74
  int rotation = rotationStr != null ? Integer.parseInt(rotationStr) : 0;
75
- retriever.release();
75
+
76
76
 
77
77
  extractor = new MediaExtractor();
78
78
  extractor.setDataSource(inputFile);
@@ -96,6 +96,9 @@ public class VideoTrimmerUtil {
96
96
  int width = widthStr != null ? Integer.parseInt(widthStr) : 0; // Default to unknown
97
97
  int height = heightStr != null ? Integer.parseInt(heightStr) : 0;
98
98
 
99
+ // IMPORTANT: after this line, the retriever is no longer needed
100
+ retriever.release();
101
+
99
102
  // Adjust buffer size based on resolution
100
103
  if (width > 3840 || height > 2160) { // 8K+
101
104
  maxBufferSize = 16 * 1024 * 1024; // 16MB for 8K
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-video-trim",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Video trimmer for your React Native app",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",