houxiao
2017-08-17 0250edfd9c4d453f25a2f9827698ccf87ff5afff
RtspFace/PL_RTSPServer.cpp
@@ -96,9 +96,18 @@
         ReleaseFrame();
         return 0;
      }
      //static size_t f = 0;
      //static FILE *pFile = fopen("/data/bb.264", "wb");
      //fwrite(in.buffer, sizeof(char), in.buffSize, pFile);
      //if (++f > 400){
      //   fclose(pFile);
      //   exit(0);
      //}
      uint8_t* pBuffer = in.buffer;
      size_t newBufferSize = in.buffSize;
      if (in.config.payWithAux)
      {
         if (newBufferSize <= 4)
@@ -109,11 +118,12 @@
         pBuffer += 4;
         newBufferSize -= 4;
      }
      *FrameBuffer = pBuffer;
      *FrameSize = newBufferSize;
      LOG_DEBUG << "send frame size=" << in.buffSize << std::endl;
      return 1;
   }
   
   virtual char ReleaseFrame()
@@ -232,7 +242,7 @@
      return false;
   memcpy(in->buffer, frame->buffer, frame->buffSize);
   in->buffSize = frame->buffSize;
   if (in->encoderStub == nullptr)
      return false;