Lines Matching refs:result
56 int result;
72 result = avcodec_open2(ctx, enc, NULL);
73 if (result < 0) {
75 return result;
86 int result;
97 result = avcodec_open2(ctx, dec, NULL);
98 if (result < 0) {
100 return result;
114 int result = 0;
132 result = av_channel_layout_copy(&in_frame->ch_layout, &enc_ctx->ch_layout);
133 if (result < 0)
134 return result;
159 result = av_frame_make_writable(in_frame);
160 if (result < 0)
161 return result;
172 result = avcodec_send_frame(enc_ctx, in_frame);
173 if (result < 0) {
175 return result;
178 while (result >= 0) {
179 result = avcodec_receive_packet(enc_ctx, enc_pkt);
180 if (result == AVERROR(EAGAIN))
182 else if (result < 0 && result != AVERROR_EOF) {
184 return result;
188 result = avcodec_send_packet(dec_ctx, enc_pkt);
190 if (result < 0) {
192 return result;
195 result = avcodec_receive_frame(dec_ctx, out_frame);
196 if (result == AVERROR(EAGAIN)) {
197 result = 0;
199 } else if (result == AVERROR(EOF)) {
200 result = 0;
202 } else if (result < 0) {
204 return result;