@scrypted/libav 1.0.19 → 1.0.20

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/decode.cpp +11 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/libav",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "dependencies": {
5
5
  "node-addon-api": "^8.1.0",
6
6
  "prebuild-install": "npm:@scrypted/prebuild-install@^7.1.8"
package/src/decode.cpp CHANGED
@@ -94,11 +94,13 @@ public:
94
94
  result = frame;
95
95
  return;
96
96
  }
97
- else {
97
+ else
98
+ {
98
99
  fprintf(stderr, "Error while receiving a frame from the decoder: %d\n", ret);
99
100
  }
100
101
  }
101
- else {
102
+ else
103
+ {
102
104
  fprintf(stderr, "Error while sending a packet to the decoder: %d\n", ret);
103
105
  }
104
106
  }
@@ -554,6 +556,13 @@ Napi::Value AVFormatContextObject::GetPointer(const Napi::CallbackInfo &info)
554
556
 
555
557
  Napi::Object Init(Napi::Env env, Napi::Object exports)
556
558
  {
559
+ int error_code = AVERROR(EAGAIN);
560
+ printf("AVERROR(EAGAIN) = %d\n", error_code);
561
+ error_code = AVERROR(AVERROR_EOF);
562
+ printf("AVERROR(AVERROR_EOF) = %d\n", error_code);
563
+ error_code = AVERROR(EINVAL);
564
+ printf("AVERROR(EINVAL) = %d\n", error_code);
565
+
557
566
  AVFilterGraphObject::Init(env, exports);
558
567
  AVFrameObject::Init(env, exports);
559
568
  AVFormatContextObject::Init(env, exports);