MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / update_context_from_user

Function update_context_from_user

libavcodec/pthread_frame.c:469–497  ·  view source on GitHub ↗

* Update the next thread's AVCodecContext with values set by the user. * * @param dst The destination context. * @param src The source context. * @return 0 on success, negative error code on failure */

Source from the content-addressed store, hash-verified

467 * @return 0 on success, negative error code on failure
468 */
469static int update_context_from_user(AVCodecContext *dst, const AVCodecContext *src)
470{
471 int err;
472
473 dst->flags = src->flags;
474
475 dst->draw_horiz_band= src->draw_horiz_band;
476 dst->get_buffer2 = src->get_buffer2;
477
478 dst->opaque = src->opaque;
479 dst->debug = src->debug;
480
481 dst->slice_flags = src->slice_flags;
482 dst->flags2 = src->flags2;
483 dst->export_side_data = src->export_side_data;
484
485 dst->skip_loop_filter = src->skip_loop_filter;
486 dst->skip_idct = src->skip_idct;
487 dst->skip_frame = src->skip_frame;
488
489 dst->frame_num = src->frame_num;
490
491 av_packet_unref(dst->internal->last_pkt_props);
492 err = av_packet_copy_props(dst->internal->last_pkt_props, src->internal->last_pkt_props);
493 if (err < 0)
494 return err;
495
496 return 0;
497}
498
499static int submit_packet(PerThreadContext *p, AVCodecContext *user_avctx,
500 AVPacket *in_pkt)

Callers 1

submit_packetFunction · 0.85

Calls 2

av_packet_unrefFunction · 0.85
av_packet_copy_propsFunction · 0.85

Tested by

no test coverage detected