Lines Matching refs:ret

54     int ret;
67 ret = AVERROR(EINVAL);
85 ret = AVERROR_INVALIDDATA;
105 ret = AVERROR_INVALIDDATA;
117 ret = ff_set_dimensions(avctx, avctx->width, avctx->height);
118 if (ret < 0)
125 ret = AVERROR_INVALIDDATA;
127 if (ret < 0) {
130 return ret;
139 int ret = av_packet_copy_props(dst, src);
140 if (ret < 0)
141 return ret;
152 int ret = 0;
159 ret = copy_packet_props(&tmp, pkt);
160 if (ret < 0)
161 return ret;
163 ret = av_fifo_write(avci->pkt_props, &tmp, 1);
164 if (ret < 0)
167 return ret;
174 int ret;
179 ret = av_bsf_list_parse_str(codec->bsfs, &avci->bsf);
180 if (ret < 0) {
181 av_log(avctx, AV_LOG_ERROR, "Error parsing decoder bitstream filters '%s': %s\n", codec->bsfs, av_err2str(ret));
182 if (ret != AVERROR(ENOMEM))
183 ret = AVERROR_BUG;
191 ret = avcodec_parameters_from_context(avci->bsf->par_in, avctx);
192 if (ret < 0)
195 ret = av_bsf_init(avci->bsf);
196 if (ret < 0)
202 return ret;
208 int ret;
213 ret = av_bsf_receive_packet(avci->bsf, pkt);
214 if (ret == AVERROR_EOF)
216 if (ret < 0)
217 return ret;
220 ret = extract_packet_props(avctx->internal, pkt);
221 if (ret < 0)
225 ret = apply_param_change(avctx, pkt);
226 if (ret < 0)
232 return ret;
283 int ret;
287 ret = ff_decode_get_packet(avctx, pkt);
288 if (ret < 0 && ret != AVERROR_EOF)
289 return ret;
305 ret = ff_thread_decode_frame(avctx, frame, &got_frame, pkt);
307 ret = codec->cb.decode(avctx, frame, &got_frame, pkt);
337 if (ret >= 0 && got_frame) {
343 ret = ret2;
444 ret >= 0 && ret != pkt->size && !(avctx->codec->capabilities & AV_CODEC_CAP_SUBFRAMES)) {
453 if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO && !(avctx->flags & AV_CODEC_FLAG_TRUNCATED))
455 if (ret >= 0 && avctx->codec->type == AVMEDIA_TYPE_VIDEO)
457 ret = pkt->size;
464 /* do not stop draining when actual_got_frame != 0 or ret < 0 */
467 if (ret < 0) {
477 ret = AVERROR_BUG;
484 if (ret >= pkt->size || ret < 0) {
488 int consumed = ret;
504 return ret < 0 ? ret : 0;
509 int ret;
515 ret = decode_simple_internal(avctx, frame, &discarded_samples);
516 if (ret < 0)
517 return ret;
527 int ret;
532 ret = codec->cb.receive_frame(avctx, frame);
533 if (ret != AVERROR(EAGAIN))
536 ret = decode_simple_receive_frame(avctx, frame);
538 if (ret == AVERROR_EOF)
547 if (!ret) {
561 ret = fdd->post_process(avctx, frame);
562 if (ret < 0) {
564 return ret;
573 return ret;
579 int ret;
592 ret = av_packet_ref(avci->buffer_pkt, avpkt);
593 if (ret < 0)
594 return ret;
597 ret = av_bsf_send_packet(avci->bsf, avci->buffer_pkt);
598 if (ret < 0) {
600 return ret;
604 ret = decode_receive_frame_internal(avctx, avci->buffer_frame);
605 if (ret < 0 && ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)
606 return ret;
642 int ret, changed;
652 ret = decode_receive_frame_internal(avctx, frame);
653 if (ret < 0)
654 return ret;
658 ret = apply_cropping(avctx, frame);
659 if (ret < 0) {
661 return ret;
685 ret = av_channel_layout_copy(&avci->initial_ch_layout, &frame->ch_layout);
686 if (ret < 0) {
688 return ret;
741 int ret = 0;
763 ret = av_new_packet(buf_pkt, inl * UTF8_MAX_BYTES);
764 if (ret < 0)
766 ret = av_packet_copy_props(buf_pkt, inpkt);
767 if (ret < 0)
775 ret = FFMIN(AVERROR(errno), -1);
784 ret = 0;
786 if (ret < 0)
790 return ret;
820 int ret = 0;
840 ret = recode_subtitle(avctx, &pkt, avpkt, avci->buffer_pkt);
841 if (ret < 0)
842 return ret;
847 ret = ffcodec(avctx->codec)->cb.decode_sub(avctx, sub, got_sub_ptr, pkt);
850 if (ret < 0) {
853 return ret;
885 return ret;
956 int ret;
977 ret = avcodec_get_hw_frames_parameters(avctx,
981 if (ret < 0)
982 return ret;
993 ret = av_hwframe_ctx_init(avctx->hw_frames_ctx);
994 if (ret < 0) {
996 return ret;
1010 int i, ret;
1028 ret = hwa->frame_params(avctx, frames_ref);
1029 if (ret >= 0) {
1048 return ret;
1104 enum AVPixelFormat ret, user_choice;
1132 ret = AV_PIX_FMT_NONE;
1140 ret = AV_PIX_FMT_NONE;
1153 ret = AV_PIX_FMT_NONE;
1171 ret = user_choice;
1216 ret = user_choice;
1232 return ret;
1329 int ret = av_channel_layout_copy(&frame->ch_layout, &avctx->ch_layout);
1330 if (ret < 0)
1331 return ret;
1407 int ret;
1413 (ret = av_image_check_size2(FFALIGN(avctx->width, STRIDE_ALIGN), avctx->height, avctx->max_pixels, AV_PIX_FMT_NONE, 0, avctx)) < 0 || avctx->pix_fmt<0) {
1415 ret = AVERROR(EINVAL);
1427 ret = AVERROR(EINVAL);
1442 ret = AVERROR(EINVAL);
1446 ret = ff_decode_frame_props(avctx, frame);
1447 if (ret < 0)
1452 ret = hwaccel->alloc_frame(avctx, frame);
1458 ret = avctx->get_buffer2(avctx, frame, flags);
1459 if (ret < 0)
1464 ret = ff_attach_decode_data(frame);
1465 if (ret < 0)
1476 if (ret < 0) {
1481 return ret;
1487 int ret;
1509 ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF);
1510 if (ret < 0) {
1512 return ret;
1523 int ret = reget_buffer_internal(avctx, frame, flags);
1524 if (ret < 0)
1526 return ret;
1532 int ret = 0;
1581 ret = AVERROR(errno);
1584 return ret;
1617 ret = decode_bsfs_init(avctx);
1618 if (ret < 0)
1619 return ret;