| 50 | |
| 51 | |
| 52 | static int encode(AVCodecContext *enc_ctx, AVFrame *frame, AVPacket *pkt) |
| 53 | { |
| 54 | int ret; |
| 55 | |
| 56 | ret = avcodec_send_frame(enc_ctx, frame); |
| 57 | if (ret < 0) |
| 58 | return ret; |
| 59 | |
| 60 | while (ret >= 0) { |
| 61 | ret = avcodec_receive_packet(enc_ctx, pkt); |
| 62 | if (ret == AVERROR(EAGAIN)) { |
| 63 | return 0; |
| 64 | } else if (ret < 0) { |
| 65 | return ret; |
| 66 | } |
| 67 | |
| 68 | av_packet_unref(pkt); |
| 69 | } |
| 70 | av_assert0(0); |
| 71 | } |
| 72 | |
| 73 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { |
| 74 | uint64_t maxpixels_per_frame = 512 * 512; |
no test coverage detected