|
FFmpeg
|
Functions responsible for allocating, freeing, and copying memory. More...
Functions | |
| void * | av_malloc (size_t size) av_malloc_attrib 1(1) |
| Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU). More... | |
| void * | av_mallocz (size_t size) av_malloc_attrib 1(1) |
| Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block. More... | |
| void * | av_malloc_array (size_t nmemb, size_t size) |
| void * | av_calloc (size_t nmemb, size_t size) av_malloc_attrib 1(1 |
| Allocate a memory block for an array with av_mallocz(). More... | |
| void void * | av_realloc (void *ptr, size_t size) 1(2) |
| Allocate, reallocate, or free a block of memory. More... | |
| av_warn_unused_result int | av_reallocp (void *ptr, size_t size) |
| Allocate, reallocate, or free a block of memory through a pointer to a pointer. More... | |
| void * | av_realloc_f (void *ptr, size_t nelem, size_t elsize) |
| Allocate, reallocate, or free a block of memory. More... | |
| void * | av_realloc_array (void *ptr, size_t nmemb, size_t size) |
| int | av_reallocp_array (void *ptr, size_t nmemb, size_t size) |
| Allocate, reallocate an array through a pointer to a pointer. More... | |
| void * | av_fast_realloc (void *ptr, unsigned int *size, size_t min_size) |
| Reallocate the given buffer if it is not large enough, otherwise do nothing. More... | |
| void | av_fast_malloc (void *ptr, unsigned int *size, size_t min_size) |
| Allocate a buffer, reusing the given one if large enough. More... | |
| void | av_fast_mallocz (void *ptr, unsigned int *size, size_t min_size) |
| Allocate and clear a buffer, reusing the given one if large enough. More... | |
| void | av_free (void *ptr) |
| Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family. More... | |
| void | av_freep (void *ptr) |
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family, and set the pointer pointing to it to NULL. More... | |
| char * | av_strdup (const char *s) av_malloc_attrib |
| Duplicate a string. More... | |
| char * | av_strndup (const char *s, size_t len) av_malloc_attrib |
| Duplicate a substring of a string. More... | |
| void * | av_memdup (const void *p, size_t size) |
| Duplicate a buffer with av_malloc(). More... | |
| void | av_memcpy_backptr (uint8_t *dst, int back, int cnt) |
| Overlapping memcpy() implementation. More... | |
Functions responsible for allocating, freeing, and copying memory.
All memory allocation functions have a built-in upper limit of INT_MAX bytes. This may be changed with av_max_alloc(), although exercise extreme caution when doing so.
| void* av_malloc | ( | size_t | size | ) |
Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU).
| size | Size in bytes for the memory block to be allocated |
NULL if the block cannot be allocated Definition at line 98 of file mem.c.
Referenced by a64multi_encode_init(), aac_decoder_config(), aax_read_packet(), add_entry(), add_file(), add_hdr_plus(), add_metadata(), adpcm_encode_init(), alloc_buffer(), alloc_gamma_tbl(), allocate_buffers(), allocate_frame_buffers(), decklink_allocator::AllocateBuffer(), amf_encode_init_av1(), aom_encode(), ape_decode_init(), ape_tag_read_field(), apng_encode_frame(), apply_color_indexing_transform(), asf_deinterleave(), asf_read_content_desc(), asf_read_ext_content(), asf_read_metadata(), asf_read_metadata_obj(), asf_read_picture(), asf_read_value(), asf_write_header(), ass_decode_frame(), ass_decode_init(), ass_encode_init(), at_write_header(), audio_element_obu(), av_append_path_component(), av_asprintf(), av_buffer_alloc(), av_dynamic_hdr_plus_to_t35(), av_encryption_info_add_side_data(), av_encryption_init_info_add_side_data(), av_expr_parse(), av_file_map(), av_frame_alloc(), av_image_alloc(), av_malloc(), av_malloc_array(), av_mallocz(), av_memdup(), av_opt_set_bin(), av_packet_alloc(), av_packet_pack_dictionary(), av_packet_side_data_new(), av_refstruct_alloc_ext_c(), av_samples_alloc(), avcodec_alloc_context3(), avfilter_graph_dump(), avi_add_ientry(), avi_read_tag(), avio_alloc_context(), avpriv_alloc_fixed_dsp(), avpriv_packet_list_put(), avpriv_tempfile(), blurdetect_config_input(), cbs_jpeg_split_fragment(), celt_header(), check_dcbzl_effect(), check_yuv2yuvX(), checkasm_check_av_tx(), checkasm_check_blend(), checkasm_check_vf_gblur(), cine_read_header(), cinepak_encode_init(), codec_config_obu(), compute_crc_of_packets(), config_input(), config_output(), config_props(), convert_mono_buffer(), convert_str(), convolution_opencl_make_filter_params(), cookie_string(), copy_to_pbr(), cqueue_create(), create_entry(), create_rtp_muxer(), create_s337_payload(), create_vorbis_context(), d3d12va_av1_decode_init(), data_open(), DECL_SETUP(), decode_dvd_subtitles(), decode_frame(), decode_header_trees(), decode_init(), decode_main_header(), decode_write(), der_to_pem(), dnn_execute_model_tf(), dnn_execute_model_th(), doubles2str(), dshow_add_device(), dshow_cycle_formats(), dtshd_read_header(), dup_wchar_to_utf8(), dvbsub_parse_region_segment(), dvdsub_parse(), dvdsub_parse_extradata(), dvdvideo_read_header(), dxv_init(), eightsvx_decode_frame(), encode_apng(), encode_frame(), encode_init(), encode_jpegls_init(), encode_tile(), escape130_decode_init(), exif_decode_tag(), extract_extradata_av1(), extract_extradata_h2645(), extract_extradata_mpeg12(), extract_extradata_mpeg4(), extract_extradata_vc1(), extract_header(), extract_lltask_from_task(), fast_malloc(), fdk_aac_decode_init(), ff_alloc_extradata(), ff_av1_filter_obus_buf(), ff_bgmc_init(), ff_celt_pvq_init(), ff_dcaadpcm_init(), ff_dovi_rpu_generate(), ff_dshow_pin_Setup(), ff_ebur128_init(), ff_ffv1_write_extradata(), ff_gblur_init_x86(), ff_http_auth_create_response(), ff_imf_cpl_alloc(), ff_init_desc_cfmt_convert(), ff_init_desc_chscale(), ff_init_desc_fmt_convert(), ff_init_desc_hscale(), ff_init_filters(), ff_init_gamma_convert(), ff_interleave_add_packet(), ff_jpegls_decode_picture(), ff_libwebp_get_frame(), ff_mov_write_packet(), ff_mpeg_er_init(), ff_nal_unit_extract_rbsp(), ff_opencl_filter_load_program(), ff_opus_psy_init(), ff_parse_fmtp(), ff_proc_from_dnn_to_frame(), ff_proc_from_frame_to_dnn(), ff_qp_table_extract(), ff_queue_create(), ff_rv34_decode_frame(), ff_safe_queue_create(), ff_sauce_read(), ff_sndio_open(), ff_sws_fill_xyztables(), ff_sws_init_single_context(), ff_sws_lut3d_alloc(), ff_sws_op_list_duplicate(), ff_tadd_string_metadata(), ff_tx_dct_init(), ff_tx_fft_init_naive_small(), ff_tx_fft_inplace_small_init(), ff_tx_fft_pfa_init(), ff_tx_gen_compound_mapping(), ff_tx_gen_default_map(), ff_tx_gen_pfa_input_map(), ff_tx_gen_ptwo_revtab(), ff_tx_init_subtx(), ff_tx_mdct_init(), ff_tx_mdct_pfa_init(), ff_urldecode(), ff_videotoolbox_av1c_extradata_create(), ff_videotoolbox_avcc_extradata_create(), ff_videotoolbox_hvcc_extradata_create(), ff_videotoolbox_vpcc_extradata_create(), ff_vk_decode_create_params(), ff_vk_exec_pool_init(), ff_vk_load_props(), ff_vmafmotion_init(), ff_vs_init(), ff_vvc_frame_thread_init(), ffat_convert_layout(), ffat_create_decoder(), ffat_get_magic_cookie(), ffat_init_encoder(), ffat_update_ctx(), ffio_ensure_seekback(), ffio_fdopen(), ffio_realloc_buf(), fft_pfa_init(), ffurl_get_multi_file_handle(), fill_gamma_table(), fill_model_input_tf(), fill_model_input_th(), fill_timecode(), filter_frame(), find_smallest_bounding_rectangle(), fixup_color_mask(), flac_decoder_config(), flac_encode_init(), flashsv_decode_frame(), flv_append_keyframe_info(), flv_parse_mod_ex_data(), fourxm_read_header(), frame_list_add_frame(), fsync_init(), ftp_open_dir(), gen_sub_text(), get_audio_config(), get_duration(), get_key(), get_matching_parameters(), get_meta(), get_metadata(), get_output_ov(), get_stats(), get_tag(), getstr8(), gif_encode_init(), h264_metadata_handle_display_orientation(), h26x_prefix_aud(), hap_init(), hls_append_segment(), hls_init(), hls_read_header(), hw_device_default_name(), iec61883_callback(), import_pem(), init(), init_filter(), init_noise(), init_pattern_from_file(), init_subtitle_context(), inject_fake_duration_metadata(), interpolate(), interpolate_refplane(), iso88591_to_utf8(), latm_decode_audio_specific_config(), lavfi_read_header(), libjxl_av_malloc(), liboapve_init(), libopus_encode_init(), librav1e_encode_init(), libvorbis_encode_init(), libx265_encode_init(), libxeve_init(), LLVMFuzzerTestOneInput(), load_mask(), m_inv_init(), magy_encode_init(), main(), make_digest_auth(), mediaformat_jni_getBuffer(), mediaformat_jni_setBuffer(), mix_presentation_obu(), mjpeg_decode_app(), mjpeg_decode_com(), mmap_read_frame(), modplug_read_header(), mov_create_chapter_track(), mov_create_dvd_sub_decoder_specific_info(), mov_parse_stsd_data(), mov_parse_uuid_spherical(), mov_read_cmov(), mov_read_colr(), mov_read_custom(), mov_read_dref(), mov_read_ftyp(), mov_read_hdlr(), mov_read_iprp(), mov_read_lhvc(), mov_read_pssh(), mov_read_saiz(), mov_read_sdtp(), mov_read_stsz(), mov_read_tkhd(), mov_text_tx3g(), mov_write_chan_tag(), mov_write_chnl_tag(), mov_write_eac3_tag(), mov_write_header(), mov_write_stts_tag(), mpa_robust_parse_packet(), mpc8_parse_seektable(), mpc_read_header(), mpegps_read_pes_header(), mpegts_write_packet_internal(), mss3_decode_init(), mxf_read_generic_descriptor(), mxf_read_us_ascii_string(), mxf_read_utf16_string(), mxpeg_decode_mxm(), nlmeans_plane(), nvenc_check_codec_support(), of_add_attachments(), ogg_new_stream(), ogg_read_page(), ogg_save(), oh_encode_output_packet(), omx_encode_frame(), open_filter_param(), open_null_ctx(), opencl_device_init(), opencl_get_device_string(), opencl_get_platform_string(), opt_get_elem(), opt_set_array(), opus_decoder_config(), opus_encode_init(), parameter_block_obu(), parse_cinespace(), parse_MP4DecConfigDescrTag(), parse_options(), parse_playlist(), parse_setup_header(), pchip_find_derivatives(), pcx_decode_frame(), pem_to_der(), piz_uncompress(), process_ftch(), prompeg_create_bitstring(), prompeg_init(), prores_encode_init(), push_main_image_2d_sequence(), push_marker_sequence(), qsv_retrieve_enc_params(), queue_frames(), read_binary(), read_dist_clustering(), read_frame(), read_geobtag(), read_graph(), read_header(), read_header_gme(), read_header_openmpt(), read_header_vs(), read_priv(), read_sb_block(), read_shape_from_file(), read_string(), read_vblock(), recv_msg(), reopen_demux_for_component(), rfc4175_handle_packet(), rl2_read_header(), roq_dpcm_encode_init(), rscc_decode_frame(), rscc_init(), rtmp_calc_swfhash(), rtmp_open(), rtp_get_multi_file_handle(), rtp_parse_mp4_au(), rtp_write_header(), rtsp_read_announce(), run_test(), rv34_decoder_alloc(), sample_queue_retain(), save_sei(), screenpresso_init(), seq_init_frame_buffers(), set_buf_size(), set_spdif(), set_string_binary(), setup_side_data_entry(), show_qrcode(), smjpeg_read_header(), sox_read_header(), spdif_write_header(), submit_stats(), svq3_decode_extradata(), swf_read_header(), swf_read_packet(), sws_allocVec(), sws_getDefaultFilter(), tak_read_header(), teletext_decode_frame(), tf_create_inference_request(), th_create_inference_request(), tiff_decode_tag(), tl_create(), tls_export_key_cert(), tls_gen_self_signed(), tls_handshake_loop(), tls_write(), tscc2_decode_init(), unescape(), unpack_codebook(), unsharp_opencl_make_filter_params(), update_block_buffers(), update_mouse_pointer(), update_size(), uri_table_map(), utvideo_encode_init(), vaapi_device_init(), vaapi_encode_h264_configure(), vaapi_encode_issue(), vaapi_encode_surface_alignment(), vaapi_frames_get_constraints(), vaapi_frames_init(), vaapi_map_frame(), vaapi_transfer_get_formats(), vanc_to_cc(), var_read_string(), vc1_decode_init_alloc_tables(), vfw_read_header(), vgs_parse_numeric_argument(), video_decode(), video_decode_example(), vmd_read_header(), vmdvideo_decode_init(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_floors(), vorbis_parse_single_comment(), vp56_size_changed(), vpx_encode(), vqa_decode_init(), vqc_decode_init(), vt_dump_encoder(), vulkan_encode_h264_init(), wavesynth_init(), wc3_read_header(), write_extradata(), write_ident(), write_manifest(), wtvfile_open_sector(), xan_decode_init(), XAVS_init(), xiph_handle_packet(), xiph_parse_fmtp_pair(), xvid_encode_init(), and xvid_strip_vol_header().
| void* av_mallocz | ( | size_t | size | ) |
Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
| size | Size in bytes for the memory block to be allocated |
NULL if it cannot be allocated Definition at line 256 of file mem.c.
Referenced by av_calloc(), and fast_malloc().
| void* av_calloc | ( | size_t | nmemb, |
| size_t | size | ||
| ) |
Allocate a memory block for an array with av_mallocz().
The allocated memory will have size size * nmemb bytes.
| nmemb | Number of elements |
| size | Size of the single element |
NULL if the block cannot be allocated| void void* av_realloc | ( | void * | ptr, |
| size_t | size | ||
| ) |
Allocate, reallocate, or free a block of memory.
If ptr is NULL and size > 0, allocate a new block. Otherwise, expand or shrink that block of memory according to size.
| ptr | Pointer to a memory block already allocated with av_realloc() or NULL |
| size | Size in bytes of the memory block to be allocated or reallocated |
NULL if the block cannot be reallocatedDefinition at line 155 of file mem.c.
Referenced by add_adaptation_set(), add_file(), append_extradata(), av_bprint_alloc(), av_bprint_finalize(), av_buffer_realloc(), av_dict_set(), av_fast_realloc(), av_get_token(), av_packet_add_side_data(), av_realloc_array(), av_realloc_f(), av_reallocp(), av_strdup(), av_strndup(), buf_realloc(), cbs_h2645_assemble_fragment(), decode_header(), epic_hash_add(), ff_cuda_load_module(), ff_els_decode_unsigned(), ff_h264_parse_sprop_parameter_sets(), ff_img_read_header(), ff_load_textfile(), ff_rtmp_packet_create(), ff_vk_load_props(), ff_vs_init(), fixup_vorbis_headers(), flac_fifo_alloc(), flac_fifo_grow(), get_ppm(), get_ppt(), jpeg2000_decode_packet(), libjxl_encode_init(), libjxl_process_output(), main(), match_streams(), mov_fix_index(), parse_adaptation_sets(), probe_codec(), qt_rtp_parse_packet(), and xmlescape().
| av_warn_unused_result int av_reallocp | ( | void * | ptr, |
| size_t | size | ||
| ) |
Allocate, reallocate, or free a block of memory through a pointer to a pointer.
If *ptr is NULL and size > 0, allocate a new block. If size is zero, free the memory block pointed to by *ptr. Otherwise, expand or shrink that block of memory according to size.
| [in,out] | ptr | Pointer to a pointer to a memory block already allocated with av_realloc(), or a pointer to NULL. The pointer is updated on success, or freed on failure. |
| [in] | size | Size in bytes for the memory block to be allocated or reallocated |
Definition at line 188 of file mem.c.
Referenced by aom_init(), append_flv_data(), asfrtp_parse_packet(), auxiliary_info_alloc_size(), av_probe_input_buffer2(), av_vdpau_bind_context(), avi_read_header(), bmv_read_packet(), cbs_h2645_assemble_fragment(), cbs_write_unit_data(), concatenate_packet(), decode_frame(), dyn_buf_write(), ff_els_decode_unsigned(), ff_opencl_filter_load_program_from_file(), fixup_vorbis_headers(), flashsv_decode_frame(), g2m_load_cursor(), get_tcp_server_response(), h264_extradata_to_annexb(), handle_metadata(), hap_decode(), hevc_extradata_to_annexb(), http_open(), jpg_decode_data(), mediacodec_receive(), mov_cenc_end_packet(), mov_realloc_extradata(), omx_encode_frame(), omx_encode_init(), opt_get_array(), parse_icy(), qt_rtp_parse_packet(), rdt_parse_sdp_line(), realloc_buffer(), rtmp_http_write(), rtmp_open(), rtmp_write(), set_segment_filename(), tdsc_decode_frame(), tdsc_decode_tiles(), tdsc_init(), tdsc_load_cursor(), tgv_decode_inter(), theora_header(), tls_handshake_loop(), tls_read(), vorbis_packet(), vpx_init(), and vvc_extradata_to_annexb().
| void* av_realloc_f | ( | void * | ptr, |
| size_t | nelem, | ||
| size_t | elsize | ||
| ) |
Allocate, reallocate, or free a block of memory.
This function does the same thing as av_realloc(), except:
nelem * elsize bytes, after checking the result of the multiplication for integer overflow.Definition at line 173 of file mem.c.
Referenced by av_reallocp_array().
| void* av_realloc_array | ( | void * | ptr, |
| size_t | nmemb, | ||
| size_t | size | ||
| ) |
Definition at line 217 of file mem.c.
Referenced by add_param_definition(), add_serial_pair(), add_side_data_from_buf_ext(), amf_encode_init_av1(), append_pad(), apv_add_configuration_entry(), apv_add_frameinfo(), aribcaption_init(), audio_element_obu(), av_dict_set(), av_fifo_alloc2(), av_fifo_grow2(), av_frame_replace(), av_opt_set_array(), av_program_add_stream_index(), avfilter_graph_alloc_filter(), avformat_new_stream(), avformat_stream_group_create(), codec_config_obu(), common_init(), decode_styl(), decode_unregistered_user_data(), decoded_frames_get_free(), ff_alsa_extend_reorder_buf(), ff_ass_add_rect2(), ff_cbs_sei_list_add(), ff_encode_add_cpb_side_data(), ff_framequeue_add(), ff_iamf_add_audio_element(), ff_iamf_add_mix_presentation(), ff_mov_write_packet(), ff_qsv_enc_init(), ff_rtmp_check_alloc_array(), ff_vaapi_decode_make_param_buffer(), ff_vaapi_decode_make_slice_buffer(), ff_vk_shader_add_descriptor_set(), ff_vk_shader_add_push_const(), ff_vk_shader_register_exec(), fill_codec_config(), fill_marker_resource(), filter_frame(), flv_queue_extradata(), frame_hash(), get_preset_file(), grow_array(), handle_file(), handler(), init(), jpeg2000_decode_packet(), log_callback(), mix_presentation_obu(), mkv_add_cuepoint(), mov_read_iinf(), mov_read_iloc(), mov_read_iref_dimg(), mxf_read_partition_pack(), new_stream_video(), ogg_new_stream(), open_virtual_track(), opt_set_array(), packet_side_data_add(), param_parse(), parse_audio_preroll(), parse_imf_asset_map_from_xml_dom(), progress_init(), push_main_audio_sequence(), push_marker_sequence(), rd_get(), realloc_section_array(), sample_queue_push(), slices_realloc(), sq_add_stream(), stream_group_add_stream(), tee_open(), update_block_dimensions(), update_frag_index(), vaapi_av1_decode_slice(), vaapi_encode_make_packed_header(), vaapi_encode_make_param_buffer(), wpp_progress_init(), wv_alloc_frame_context(), and xan_decode_frame().
| int av_reallocp_array | ( | void * | ptr, |
| size_t | nmemb, | ||
| size_t | size | ||
| ) |
Allocate, reallocate an array through a pointer to a pointer.
If *ptr is NULL and nmemb > 0, allocate a new block.
| [in,out] | ptr | Pointer to a pointer to a memory block already allocated with av_realloc(), or a pointer to NULL. The pointer is updated on success, or freed on failure. |
| [in] | nmemb | Number of elements |
| [in] | size | Size of the single element |
Definition at line 225 of file mem.c.
Referenced by add_fragment(), add_program(), add_segment(), add_tracked_method(), allocate_buffers(), ass_split_section(), evcc_array_add_nal_unit(), ff_h2645_extract_rbsp(), ff_h2645_sei_ctx_replace(), ff_hap_set_chunk_count(), gem_decode_frame(), gxf_write_map_packet(), gxf_write_packet(), hvcc_array_add_nal_unit(), hw_device_add(), init_tile_data(), mov_add_tfra_entries(), mov_build_index(), mov_finish_fragment(), mov_read_trex(), mxf_write_packet(), mxf_write_partition(), nut_write_packet(), ogg_restore(), opencl_frames_get_constraints(), parse_adaptation_sets(), parse_strk(), tgv_decode_inter(), tm2_read_stream(), update_dimensions_clear_info(), update_index(), vp56_size_changed(), vvcc_array_add_nal_unit(), and write_tiles().
| void* av_fast_realloc | ( | void * | ptr, |
| unsigned int * | size, | ||
| size_t | min_size | ||
| ) |
Reallocate the given buffer if it is not large enough, otherwise do nothing.
If the given buffer is NULL, then a new uninitialized buffer is allocated.
If the given buffer is not large enough, and reallocation fails, NULL is returned and *size is set to 0, but the original buffer is not changed or freed.
A typical use pattern follows:
| [in,out] | ptr | Already allocated buffer, or NULL |
| [in,out] | size | Pointer to the size of buffer ptr. *size is updated to the new allocated size, in particular 0 in case of failure. |
| [in] | min_size | Desired minimal size of buffer ptr |
ptr if the buffer is large enough, a pointer to newly reallocated buffer if the buffer was not large enough, or NULL in case of error Definition at line 497 of file mem.c.
Referenced by add_index_entry(), add_tts_entry(), av_exif_set_entry(), caf_write_packet(), config_output(), decode_frame(), dirac_combine_frame(), draw_items(), dxv_decode(), dxva2_av1_decode_slice(), evc_frame_merge_filter(), exif_parse_ifd_list(), ff_add_index_entry(), ff_af_queue_add(), ff_av1_packet_split(), ff_combine_frame(), ff_h2645_packet_split(), ff_mms_asf_header_parser(), ff_nvdec_simple_decode_slice(), ff_range_add(), ff_subtitles_queue_insert(), ff_tx_init_subtx(), ff_vdpau_add_buffer(), ff_videotoolbox_buffer_append(), ff_videotoolbox_buffer_copy(), ff_vk_decode_add_slice(), ff_vk_exec_add_dep_buf(), ff_vk_exec_add_dep_sw_frame(), filter_frame(), flac_fifo_read_wrap(), get_stats(), h264_extradata_to_annexb(), h264_mp4toannexb_save_ps(), init(), intercept_id3(), libx265_encode_frame(), lzf_realloc(), mov_merge_tts_data(), mov_parse_auxiliary_info(), mov_read_ctts(), mov_read_pssh(), mov_read_saio(), mov_read_senc(), mov_read_stts(), mov_read_trun(), mov_text_style_start(), mxg_update_cache(), nal_parse_units(), nvdec_av1_decode_slice(), nvdec_h264_decode_slice(), nvdec_hevc_decode_slice(), nvdec_vc1_decode_slice(), open_track_file_resource(), parse_string(), prepare_sei_data_array(), push_main_audio_sequence(), push_main_image_2d_sequence(), queue_frames(), read_frame(), setup_frame(), shorten_decode_frame(), spdif_header_eac3(), update_frag_index(), and vc1_decode_frame().
| void av_fast_malloc | ( | void * | ptr, |
| unsigned int * | size, | ||
| size_t | min_size | ||
| ) |
Allocate a buffer, reusing the given one if large enough.
Contrary to av_fast_realloc(), the current buffer contents might not be preserved and on error the old buffer is freed, thus no special handling to avoid memleaks is necessary.
*ptr is allowed to be NULL, in which case allocation always happens if size_needed is greater than 0.
| [in,out] | ptr | Pointer to pointer to an already allocated buffer. *ptr will be overwritten with pointer to new buffer on success or NULL on failure |
| [in,out] | size | Pointer to the size of buffer *ptr. *size is updated to the new allocated size, in particular 0 in case of failure. |
| [in] | min_size | Desired minimal size of buffer *ptr |
Definition at line 557 of file mem.c.
Referenced by alloc_scratch_buffers(), allocate_buffers(), ape_decode_frame(), audio_decode_frame(), av_fast_padded_mallocz(), bl16_decode_8(), chs_alloc_lsb_band_data(), chs_alloc_msb_band_data(), chs_assemble_freq_bands(), codec_reinit(), crypto_write(), decode_frame(), decode_slice(), detect_clips(), do_interpolation(), ff_dca_core_filter_fixed(), ff_h274_hash_verify(), fic_decode_frame(), filter_frame_float(), find_motion(), gif_decode_frame(), gif_read_image(), id3v2_parse(), interpolation(), ljpeg_decode_rgb_scan(), magy_decode_frame(), opus_decode_subpacket(), parse_navi_table(), parse_utf(), pmp_packet(), rscc_decode_frame(), scale_internal(), spdif_header_dts4(), spdif_write_packet(), tak_decode_frame(), truemotion1_decode_header(), truemotion1_decode_init(), update_block_dimensions(), update_init_section(), update_md5_sum(), and verify_md5().
| void av_fast_mallocz | ( | void * | ptr, |
| unsigned int * | size, | ||
| size_t | min_size | ||
| ) |
Allocate and clear a buffer, reusing the given one if large enough.
Like av_fast_malloc(), but all newly allocated space is initially cleared. Reused buffer is not cleared.
*ptr is allowed to be NULL, in which case allocation always happens if size_needed is greater than 0.
| [in,out] | ptr | Pointer to pointer to an already allocated buffer. *ptr will be overwritten with pointer to new buffer on success or NULL on failure |
| [in,out] | size | Pointer to the size of buffer *ptr. *size is updated to the new allocated size, in particular 0 in case of failure. |
| [in] | min_size | Desired minimal size of buffer *ptr |
Definition at line 562 of file mem.c.
Referenced by alloc_sample_buffer(), alloc_scratch_buffers(), alloc_x96_sample_buffer(), av_exif_clone_ifd(), av_fast_padded_malloc(), decode_frame(), and g2m_init_buffers().
| void av_free | ( | void * | ptr | ) |
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family.
| ptr | Pointer to the memory block which should be freed. |
ptr = NULL is explicitly allowed. Definition at line 238 of file mem.c.
Referenced by av_freep(), and av_realloc_f().
| void av_freep | ( | void * | ptr | ) |
Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family, and set the pointer pointing to it to NULL.
| ptr | Pointer to the pointer to the memory block which should be freed |
*ptr = NULL is safe and leads to no action. Definition at line 247 of file mem.c.
Referenced by av_dynarray2_add(), av_dynarray_add(), av_reallocp(), and fast_malloc().
| char* av_strdup | ( | const char * | s | ) |
Duplicate a string.
| s | String to be duplicated |
s or NULL if the string cannot be allocated Definition at line 272 of file mem.c.
Referenced by add_tracked_method(), aribcaption_trans_text_subtitle(), ass_decode_frame(), av_append_path_component(), av_channel_layout_from_string(), av_dict_get_string(), av_dict_set(), av_opt_get(), av_opt_get_array(), avfilter_graph_parse(), avfilter_graph_queue_command(), avfilter_graph_segment_create_filters(), avformat_alloc_output_context2(), avformat_open_input(), avpriv_tempfile(), caca_write_header(), check_avoptions_used(), check_extensions(), check_layers(), cine_read_header(), config_eq_output(), config_input(), config_output(), config_params(), configure_filtergraph(), configure_video_filters(), copy_av_subtitle(), create_rtp_muxer(), create_streams(), curves_init(), dash_init(), dec_filter_add(), dec_open(), delimited_dict_parse(), describe_filter_link(), draw_curves(), enc_stats_get_file(), exchange_sdp(), ff_alsa_get_device_list(), ff_boxblur_eval_filter_params(), ff_copy_whiteblacklists(), ff_decklink_list_devices(), ff_fbdev_get_device_list(), ff_filter_alloc(), ff_http_do_new_request2(), ff_http_match_no_proxy(), ff_jni_jstring_to_utf_chars(), ff_mkdir_p(), ff_tls_open_underlying(), ffio_fdopen(), ffurl_connect(), fg_send_command(), filter_parse(), format_name(), ftp_connect(), ftp_current_dir(), ftp_parse_entry_mlsd(), ftp_parse_entry_nlst(), generate_sdp_offer(), geq_init(), get_cookies(), get_current_fragment(), get_opt_flags_string(), getenv_dup(), hls_delete_old_segments(), hls_init(), hls_mux_init(), hls_read_header(), hls_rename_temp_file(), hls_start(), hls_write_packet(), hls_write_trailer(), http_open(), http_open_cnx(), http_seek_internal(), icecast_open(), ifilter_bind_dec(), ifilter_bind_ist(), imf_read_header(), init(), init_filter(), init_filters(), init_muxer(), initialize(), inout_add(), ist_add(), ist_filter_add(), label_string(), lavfi_read_header(), libsmbc_read_dir(), libssh_read_dir(), log_callback(), main(), match_stream_specifier(), measure_text(), mediacodec_dec_get_audio_codec(), mediacodec_dec_get_video_codec(), mediacodec_ndk_getName(), mediaformat_ndk_getString(), mediaformat_ndk_toString(), mkv_write_simpletag(), mmsh_open_internal(), mpjpeg_read_packet(), mtv_read_header(), new_init_section(), new_stream_video(), nppscale_parse_expr(), of_add_attachments(), of_add_groups(), of_parse_iamf_submixes(), ofilter_bind_enc(), ofilter_bind_ifilter(), open_camera(), open_input_file(), open_output_file(), open_slave(), opt_add_vfilter(), opt_attach(), opt_codec(), opt_copy_elem(), opt_filter_complex(), opt_filter_threads(), opt_get_elem(), opt_input_file(), opt_output_file_o(), opt_print_filename(), opt_vstats_file(), ost_get_filters(), param_init(), parse_answer(), parse_assetmap(), parse_cc_stream_mapstring(), parse_channel_expressions(), parse_device_name(), parse_fmtp(), parse_imf_asset_map_from_xml_dom(), parse_location(), parse_manifest(), parse_manifest_representation(), parse_playlist(), parse_psfile(), parse_read_interval(), parse_read_intervals(), parse_set_cookie(), parse_speaker_pos(), parse_times(), parse_variant_stream_mapstring(), parse_video_var(), plot_freqs(), process_command(), process_line(), pulse_add_detected_device(), pulse_server_info_cb(), qsv_decode_init(), qsv_enc_init(), read_channels(), read_classify_label_file(), read_custom_noise(), read_detect_label_file(), read_gains(), read_header(), read_tf_coefficients(), read_ttag(), read_zp_coefficients(), realtext_read_header(), rfc4175_parse_fmtp(), rtmp_http_open(), run_transcription(), sami_paragraph_to_ass(), sap_read_header(), sap_write_header(), scale_parse_expr(), sch_sdp_filename(), segment_end(), set_ass_header(), set_enable_expr(), set_expr(), set_str(), set_string(), show_help(), sls_flags_filename_process(), stream_open(), stream_specifier_parse(), tiff_decode_tag(), update_master_pl_info(), v4l2_get_device_list(), validate_name(), write_option(), write_packet(), xcbgrab_read_header(), and xv_write_header().
| char* av_strndup | ( | const char * | s, |
| size_t | len | ||
| ) |
Duplicate a substring of a string.
| s | String to be duplicated |
| len | Maximum length of the resulting string (not counting the terminating byte) |
s or NULL if the string cannot be allocated Definition at line 284 of file mem.c.
Referenced by get_extension(), hw_device_init_from_string(), match_stream_specifier(), mpjpeg_get_boundary(), parse_adaptation_sets(), parse_cookie(), process_line(), stream_specifier_parse(), and vgs_parse_statement().
| void* av_memdup | ( | const void * | p, |
| size_t | size | ||
| ) |
Duplicate a buffer with av_malloc().
| p | Buffer to be duplicated |
| size | Size in bytes of the buffer copied |
p or NULL if the buffer cannot be allocated Definition at line 304 of file mem.c.
Referenced by amf_init_encoder(), aribcaption_trans_bitmap_subtitle(), av_bprint_finalize(), av_frame_ref(), av_frame_replace(), codec_parameters_copy_side_data(), compute_chapters_end(), copy_av_subtitle(), dnxhd_encode_init(), dvbsub_parse_clut_segment(), exif_clone_entry(), ff_filter_alloc(), ff_get_format(), ff_hevc_decode_nal_pps(), ff_hevc_decode_nal_sps(), ff_hevc_decode_nal_vps(), ff_iamf_write_audio_frame(), ff_mov_write_packet(), ff_mpv_init_duplicate_contexts(), ff_psy_init(), ff_setup_memdup(), ff_sws_op_list_duplicate(), fill_codec_config(), g723_1_encode_frame(), handle_nack_rtx(), init_thread(), libx265_encode_frame(), LLVMFuzzerTestOneInput(), main(), mov_create_chapter_track(), mov_write_single_packet(), mpegts_set_stream_info(), opt_copy_elem(), parse_header(), prepare_sei_data_array(), process_frame(), save_subtitle_set(), set_aes_arg(), setup_frame(), solve_shuffle(), subtitle_wrap_frame(), and vorbis_header().
| void av_memcpy_backptr | ( | uint8_t * | dst, |
| int | back, | ||
| int | cnt | ||
| ) |
Overlapping memcpy() implementation.
| dst | Destination buffer |
| back | Number of bytes back to start copying (i.e. the initial size of the overlapping window); must be > 0 |
| cnt | Number of bytes to copy; must be >= 0 |
cnt > back is valid, this will copy the bytes we just copied, thus creating a repeating pattern with a period length of back. Definition at line 447 of file mem.c.
Referenced by color_frame(), copy_backptr(), decode_dsw1(), decode_frame(), decode_tsw1(), ff_lzf_uncompress(), fill_frame(), generate_missing_ref(), memset_bytes(), mszh_decomp(), picmemset(), qsv_fill_border(), qsvenc_fill_padding_area(), residual_interp(), synth_block_fcb_acb(), unpack(), and xan_unpack().
1.8.17