Lines Matching refs:ret

95     int ret = 0;
106 ret = AVERROR(EINVAL);
112 ret = AVERROR(EINVAL);
141 ret = AVERROR(ENOMEM);
144 return ret;
186 int ret = 0;
191 if ((ret = av_opt_set_dict(s, &tmp)) < 0)
194 (ret = av_opt_set_dict2(s->priv_data, &tmp, AV_OPT_SEARCH_CHILDREN)) < 0)
198 ret = AVERROR(ENOMEM);
205 ret = AVERROR(EINVAL);
227 ret = AVERROR(EINVAL);
255 ret = AVERROR(EINVAL);
270 ret = AVERROR(EINVAL);
299 ret = AVERROR_INVALIDDATA;
318 ret = AVERROR(ENOMEM);
324 if ((ret = av_opt_set_dict2(s->priv_data, &tmp, AV_OPT_SEARCH_CHILDREN)) < 0)
346 if ((ret = s->oformat->init(s)) < 0) {
349 return ret;
351 return ret == 0;
358 return ret;
436 int ret = 0;
438 if ((ret = init_muxer(s, options)) < 0)
439 return ret;
442 si->streams_initialized = ret;
444 if (s->oformat->init && ret) {
445 if ((ret = init_pts(s)) < 0)
446 return ret;
459 int ret = 0;
462 if ((ret = avformat_init_output(s, options)) < 0)
463 return ret;
468 ret = s->oformat->write_header(s);
469 if (ret >= 0 && s->pb && s->pb->error < 0)
470 ret = s->pb->error;
471 if (ret < 0)
479 if ((ret = init_pts(s)) < 0)
487 return ret;
711 int ret;
728 ret = s->oformat->write_uncoded_frame(s, pkt->stream_index, frame, 0);
730 ret = s->oformat->write_packet(s, pkt);
733 if (s->pb && ret >= 0) {
736 ret = s->pb->error;
739 if (ret >= 0)
742 return ret;
822 int ret;
834 if ((ret = av_packet_make_refcounted(pkt)) < 0) {
837 return ret;
929 int ret;
933 if ((ret = ff_interleave_add_packet(s, pkt, interleave_compare_dts)) < 0)
934 return ret;
1076 int ret;
1083 if ((ret = s->oformat->check_bitstream(s, &sti->pub, pkt)) < 0)
1084 return ret;
1085 else if (ret == 1)
1098 int ret = si->interleave_packet(s, pkt, flush, has_packet);
1099 if (ret <= 0)
1100 return ret;
1104 ret = write_packet(s, pkt);
1106 if (ret < 0)
1107 return ret;
1113 int ret;
1122 if ((ret = compute_muxer_pkt_fields(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
1123 return ret;
1139 int ret;
1141 if ((ret = av_bsf_send_packet(bsfc, pkt)) < 0) {
1145 return ret;
1149 ret = av_bsf_receive_packet(bsfc, pkt);
1150 if (ret < 0) {
1151 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
1154 "packet for stream #%d: %s\n", st->index, av_err2str(ret));
1155 if (!(s->error_recognition & AV_EF_EXPLODE) && ret != AVERROR(ENOMEM))
1157 return ret;
1160 ret = write_packet_common(s, st, pkt, interleaved);
1161 if (ret >= 0 && !interleaved) // a successful write_packet_common already unrefed pkt for interleaved
1163 } while (ret >= 0);
1165 return ret;
1172 int ret = check_packet(s, pkt);
1173 if (ret < 0)
1174 return ret;
1178 ret = prepare_input_packet(s, st, pkt);
1179 if (ret < 0)
1180 return ret;
1182 ret = check_bitstream(s, sti, pkt);
1183 if (ret < 0)
1184 return ret;
1197 int ret;
1201 ret = s->oformat->write_packet(s, NULL);
1203 if (ret >= 0 && s->pb && s->pb->error < 0)
1204 ret = s->pb->error;
1205 return ret;
1220 ret = av_packet_copy_props(pkt, in);
1221 if (ret < 0)
1222 return ret;
1226 ret = AVERROR(ENOMEM);
1232 ret = write_packets_common(s, pkt, 0/*non-interleaved*/);
1237 return ret;
1242 int ret;
1245 ret = write_packets_common(s, pkt, 1/*interleaved*/);
1246 if (ret < 0)
1248 return ret;
1259 int ret1, ret = 0;
1268 if (ret >= 0)
1269 ret = ret1;
1273 if (ret >= 0)
1274 ret = ret1;
1279 if (ret >= 0) {
1280 ret = s->oformat->write_trailer(s);
1290 if (ret == 0)
1291 ret = s->pb ? s->pb->error : 0;
1300 return ret;
1314 int ret;
1326 if ((ret = av_bsf_alloc(bsf, &bsfc)) < 0)
1327 return ret;
1330 if ((ret = avcodec_parameters_copy(bsfc->par_in, st->codecpar)) < 0) {
1332 return ret;
1336 if ((ret = av_set_options_string(bsfc->priv_data, args, "=", ":")) < 0) {
1338 return ret;
1342 if ((ret = av_bsf_init(bsfc)) < 0) {
1344 return ret;
1361 int ret;
1370 ret = av_write_frame(dst, pkt);
1380 ret = av_interleaved_write_frame(dst, pkt);
1382 return ret;