| 1234567891011121314 |
- #include "abstract_encoder.h"
- AVPacket* AbstractEncoder::Encode()
- {
- int ret = avcodec_receive_packet(_codecCtx, _packet);
- if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
- return nullptr;
- } else if (ret < 0) {
- __DebugPrint("avcodec_receive_packet : Error during encoding");
- return nullptr;
- }
- return _packet;
- }
|