shithub: openh264

Download patch

ref: 99cfac6aa0d9486f1aea89ddbde4c80eb456ef49
parent: 3f333b01fdc194d03d5c3902c3a819d53041e7ae
author: ruil2 <[email protected]>
date: Wed Jun 25 10:11:58 EDT 2014

add IDR processing in gmp wrapper

--- a/module/gmp-openh264.cpp
+++ b/module/gmp-openh264.cpp
@@ -331,6 +331,15 @@
                  GMPVideoFrameType frame_type) {
     SFrameBSInfo encoded;
 
+    if (frame_type  == kGMPKeyFrame) {
+      encoder_->ForceIntraFrame (true);
+      if (!inputImage)
+        return;
+    }
+    if (!inputImage) {
+      GMPLOG (GL_ERROR, "no input image");
+      return;
+    }
     SSourcePicture src;
 
     src.iColorFormat = videoFormatI420;