FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
Memory Management
Common utility functions

Macros

#define DECLARE_ALIGNED(n, t, v)   t v
 
#define DECLARE_ASM_CONST(n, t, v)   static const t v
 
#define av_malloc_attrib
 
#define av_alloc_size(...)
 

Functions

voidav_malloc (size_t size) av_malloc_attrib av_alloc_size(1)
 Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).
 
 av_alloc_size (1, 2) static inline void *av_malloc_array(size_t nmemb
 Helper function to allocate a block of size * nmemb bytes with using av_malloc()
 
return av_malloc (nmemb *size)
 
voidav_realloc (void *ptr, size_t size) av_alloc_size(2)
 Allocate or reallocate a block of memory.
 
voidav_realloc_f (void *ptr, size_t nelem, size_t elsize)
 Allocate or reallocate a block of memory.
 
void av_free (void *ptr)
 Free a memory block which has been allocated with av_malloc(z)() or av_realloc().
 
voidav_mallocz (size_t size) av_malloc_attrib av_alloc_size(1)
 Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
 
voidav_calloc (size_t nmemb, size_t size) av_malloc_attrib
 Allocate a block of nmemb * size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.
 
return av_mallocz (nmemb *size)
 
char * av_strdup (const char *s) av_malloc_attrib
 Duplicate the string s.
 
void av_freep (void *ptr)
 Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer pointing to it to NULL.
 
void av_dynarray_add (void *tab_ptr, int *nb_ptr, void *elem)
 Add an element to a dynamic array.
 
static int av_size_mult (size_t a, size_t b, size_t *r)
 Multiply two size_t values checking for overflow.
 
void av_max_alloc (size_t max)
 Set the maximum size that may me allocated in one block.
 
void av_memcpy_backptr (uint8_t *dst, int back, int cnt)
 deliberately overlapping memcpy implementation
 

Variables

size_t size
 

Detailed Description

Macro Definition Documentation

#define DECLARE_ALIGNED (   n,
  t,
  v 
)    t v
#define DECLARE_ASM_CONST (   n,
  t,
  v 
)    static const t v

Definition at line 60 of file mem.h.

#define av_malloc_attrib

Definition at line 66 of file mem.h.

#define av_alloc_size (   ...)

Definition at line 72 of file mem.h.

Function Documentation

void* av_malloc ( size_t  size)

Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU).

Parameters
sizeSize in bytes for the memory block to be allocated.
Returns
Pointer to the allocated block, NULL if the block cannot be allocated.
See Also
av_mallocz()

Definition at line 73 of file mem.c.

Referenced by a64multi_init_encoder(), aacPlus_encode_init(), add_doubles_metadata(), add_file(), add_metadata(), add_shorts_metadata(), add_string_metadata(), adpcm_encode_init(), alloc_samples_array_and_data(), alloc_scratch_buffers(), alloc_sequence_buffers(), allocate_frame_buffers(), allocate_tables(), allocStuff(), apc_read_header(), ape_read_header(), ape_tag_read_field(), append_entry(), asf_read_picture(), asf_write_header(), ass_decode_init(), ass_encode_init(), audio_encode_example(), av_asprintf(), av_audio_convert_alloc(), av_bprint_finalize(), av_buffersink_params_alloc(), av_d2str(), av_expr_parse(), av_fft_init(), av_fifo_alloc(), av_file_map(), av_get_token(), av_image_alloc(), av_malloc(), av_mallocz(), av_new_packet(), av_opt_get(), av_opt_set_bin(), av_packet_merge_side_data(), av_packet_new_side_data(), av_packet_split_side_data(), av_parser_change(), av_realloc(), av_samples_alloc(), av_strdup(), av_tempfile(), avcodec_alloc_context3(), avcodec_alloc_frame(), avfilter_copy_frame_props(), avfilter_open(), avfilter_ref_buffer(), avformat_alloc_context(), avformat_find_stream_info(), avi_read_header(), avi_read_tag(), avi_write_packet(), avisynth_read_header(), avresample_set_matrix(), bfi_read_header(), build_filter(), calc_rice_params(), celt_header(), cmdutils_read_file(), cng_encode_init(), concat_open(), config(), config_input(), config_output(), config_props(), convert_str(), copy_parameter_set(), copy_video_props(), create_all_formats(), create_cel_evals(), create_map(), create_vorbis_context(), data_open(), decode_dvd_subtitles(), decode_frame(), decode_header_trees(), decode_init(), decode_main_header(), decode_picture_header(), decode_rle(), denoise_depth(), dnxhd_encode_init(), do_subtitle_out(), doubles2str(), dshow_add_device(), dshow_cycle_formats(), dtshd_read_header(), dump_extradata(), dup_wchar_to_utf8(), dvbsub_display_end_segment(), dvbsub_parse_clut_segment(), dvbsub_parse_init(), dvbsub_parse_region_segment(), dvdsub_parse(), dvdsub_parse_extradata(), ebml_read_ascii(), eightsvx_decode_frame(), encode_frame(), encode_init(), encode_intervals(), encode_picture_ls(), escape130_decode_init(), estimate_best_b_count(), extract_header(), Faac_encode_init(), ff_ac3_float_mdct_init(), ff_alsa_open(), ff_asf_parse_packet(), ff_ass_add_rect(), ff_audio_data_realloc(), ff_bgmc_init(), ff_ccitt_unpack(), ff_dct_init(), ff_do_elbg(), ff_fast_malloc(), ff_fft_init(), ff_fill_line_with_color(), ff_gen_syncpoint_search(), ff_http_auth_create_response(), ff_huffyuv_alloc_temp(), ff_init_elbg(), ff_init_rl(), ff_init_vlc_sparse(), ff_ivi_init_tiles(), ff_j2k_dwt_init(), ff_j2k_init_component(), ff_mdct_init(), ff_merge_channel_layouts(), ff_mjpeg_decode_sof(), ff_mjpeg_encode_init(), ff_mov_write_packet(), ff_mp_image_alloc_planes(), ff_MPV_common_frame_size_change(), ff_MPV_common_init(), ff_mss12_decode_init(), ff_parse_fmtp(), ff_parse_mpeg2_descriptor(), ff_pca_init(), ff_png_zalloc(), ff_psy_init(), ff_rtmp_packet_create(), ff_rv34_decode_frame(), ff_sauce_read(), ff_slice_buffer_init(), ff_sndio_open(), ff_store_parser_state(), ff_tls_init(), ff_urldecode(), ff_vc1_decode_init_alloc_tables(), ff_vda_create_decoder(), ff_vorbis_comment(), ff_yuv2rgb_c_init_tables(), ffio_fdopen(), ffio_set_buf_size(), ffm2_read_header(), ffm_read_header(), fft_ref_init(), ffurl_get_multi_file_handle(), ffv1_allocate_initial_states(), ffv1_init_slice_contexts(), ffv1_init_slice_state(), film_read_header(), film_read_packet(), find_and_decode_index(), find_headers_search_validate(), find_motion(), find_next_parse_unit(), find_smallest_bounding_rectangle(), flac_encode_init(), flac_header(), flac_write_block_comment(), flashsv_decode_frame(), flv_set_video_codec(), fourxm_read_header(), frame_list_add_frame(), frame_thread_init(), generate_codebook(), generate_dither_noise(), generate_new_codebooks(), get_codec_data(), get_cookies(), get_geokey_val(), get_key(), get_meta(), get_metadata(), get_stats(), get_tag(), getstr8(), gif_encode_init(), guess_dc(), halfpel_interpol(), hls_read_header(), hls_write_header(), idcin_read_header(), iec61883_callback(), iff_read_header(), imx_dump_header(), init(), init_bundles(), init_coef_vlc(), init_cook_mlt(), init_er(), init_filter_param(), init_mv_table(), init_noise(), init_pass2(), init_pattern_from_file(), init_tiles(), initFilter(), initNoise(), interpolate_refplane(), iso88591_to_utf8(), lag_decode_frame(), latm_decode_audio_specific_config(), lavfi_read_header(), libAVPin_Setup(), libopus_encode_init(), libschroedinger_decode_frame(), load_mask(), main(), make_digest_auth(), make_format_list(), matroska_decode_buffer(), matroska_fix_ass_packet(), matroska_read_header(), mjpeg2jpeg_filter(), mjpeg_decode_com(), mjpega_dump_header(), mmap_init(), mmap_read_frame(), modplug_read_header(), mov2textsub(), mov_create_timecode_track(), mov_metadata_raw(), mov_read_cmov(), mov_read_ctts(), mov_read_dref(), mov_read_ftyp(), mov_read_hdlr(), mov_read_sbgp(), mov_read_stco(), mov_read_stps(), mov_read_stsc(), mov_read_stss(), mov_read_stsz(), mov_read_stts(), mov_read_trun(), mov_write_ctts_tag(), mov_write_header(), mov_write_stts_tag(), mp3_header_compress(), mp3_header_decompress(), mp3lame_encode_init(), mpc8_parse_seektable(), mpc_read_header(), mpegts_open_section_filter(), mpegts_push_data(), mpegts_set_stream_info(), mpegts_write_header(), mpegts_write_packet_internal(), mss3_decode_init(), mss4_decode_init(), mxf_read_generic_descriptor(), mxpeg_decode_mxm(), new_connection(), noise(), nsv_parse_NSVf_header(), nut_read_header(), ogg_new_buf(), ogg_new_stream(), ogg_read_page(), ogg_save(), oggvorbis_encode_init(), ogm_header(), open_audio(), open_null_ctx(), open_output_file(), opus_header(), packet_queue_put_private(), pad_last_frame(), parse_forced_key_frames(), parse_frames(), parse_MP4DecConfigDescrTag(), parse_options(), parse_packed_headers(), parse_picture(), parse_playlist(), parse_presentation_segment(), parse_setup_header(), parse_times(), pcx_decode_frame(), pp_get_context(), pp_get_mode_by_name_and_quality(), precalc_coefs(), prepare_sdp_description(), print_sdp(), process_line(), prores_encode_init(), qt_rtp_parse_packet(), queue_frames(), r3d_read_rdvo(), radix_sort(), raw_init_decoder(), read_apic(), read_ffserver_streams(), read_frame(), read_geobtag(), read_header(), read_shape_from_file(), read_specific_config(), ready_codebook(), rl2_read_header(), rm_read_extradata(), rm_write_audio(), roq_dpcm_encode_init(), roq_encode_init(), rtmp_calc_swfhash(), rtmp_open(), rtp_get_multi_file_handle(), rtp_new_connection(), rtp_parse_mp4_au(), rtp_write_header(), rv34_decoder_alloc(), sample_queue_retain(), sdp_parse_fmtp_config_h264(), seq_init_frame_buffers(), set_string_binary(), shift_data(), shorts2str(), smacker_read_header(), smjpeg_read_header(), smush_read_header(), sox_read_header(), spdif_write_header(), speex_header(), Stagefright_decode_frame(), start_jack(), submit_stats(), sunrast_decode_frame(), svq1_decode_frame(), svq1_encode_frame(), svq3_decode_init(), svq3_parse_packet(), swf_read_header(), swf_read_packet(), swri_get_dither(), sws_allocVec(), sws_getDefaultFilter(), sws_init_context(), sws_scale(), tak_read_header(), text2movsub(), tgv_decode_frame(), tiff_decode_tag(), tiff_unpack_strip(), tm2_build_huff_table(), tscc2_decode_init(), tta_decode_init(), unescape(), unpack_codebook(), utvideo_decode_init(), utvideo_encode_init(), var_read_string(), vble_decode_init(), vc1t_read_header(), vf_open(), vfw_read_header(), vid_read_packet(), video_audio_display(), video_get_buffer(), vmd_read_header(), vmdvideo_decode_init(), vorbis_parse_id_hdr(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_floors(), vorbis_parse_setup_hdr_residues(), vp56_size_changed(), vp8_decode_frame(), vp8_encode(), vpx_init(), vqa_decode_init(), vqf_read_header(), wavesynth_init(), wc3_read_header(), write_extradata(), write_frame(), writer_open(), wtvfile_open_sector(), X264_init(), xan_decode_init(), XAVS_init(), xiph_handle_packet(), xiph_parse_fmtp_pair(), xmv_process_packet_header(), xmv_read_header(), xvid_encode_init(), xvid_strip_vol_header(), and xwma_read_header().

av_alloc_size ( ,
 
)

Helper function to allocate a block of size * nmemb bytes with using av_malloc()

Helper function to allocate a block of size * nmemb bytes with using av_mallocz()

Parameters
nmembNumber of elements
sizeSize of the single element
Returns
Pointer to the allocated block, NULL if the block cannot be allocated.
See Also
av_malloc()
Parameters
nmembNumber of elements
sizeSize of the single element
Returns
Pointer to the allocated block, NULL if the block cannot be allocated.
See Also
av_mallocz()
av_malloc_array()
return av_malloc ( nmemb *  size)
void* av_realloc ( void ptr,
size_t  size 
)

Allocate or reallocate a block of memory.

If ptr is NULL and size > 0, allocate a new block. If size is zero, free the memory block pointed to by ptr.

Parameters
ptrPointer to a memory block already allocated with av_malloc(z)() or av_realloc() or NULL.
sizeSize in bytes for the memory block to be allocated or reallocated.
Returns
Pointer to a newly reallocated block or NULL if the block cannot be reallocated or the function is used to free the memory block.
See Also
av_fast_realloc()

Definition at line 141 of file mem.c.

Referenced by add_file(), add_fragment(), add_pat_entry(), add_serial_pair(), add_tracked_method(), alloc_and_copy(), allocate_buffers(), asfrtp_parse_packet(), ass_split_section(), av_bprint_alloc(), av_bprint_finalize(), av_dict_set(), av_dynarray_add(), av_fast_realloc(), av_grow_packet(), av_packet_new_side_data(), av_probe_input_buffer(), av_realloc_f(), avcodec_encode_audio2(), avcodec_encode_video2(), avfilter_graph_add_filter(), avformat_new_stream(), bmv_read_packet(), concat_open(), concatenate_packet(), decode_frame(), draw_text(), ebml_parse_elem(), ff_alsa_extend_reorder_buf(), ff_ass_add_rect(), ff_insert_pad(), ff_print_debug_info2(), ff_program_add_stream_index(), filter_frame(), fixup_vorbis_headers(), flashsv_decode_frame(), get_packet(), get_tcp_server_response(), grow_array(), h264_mp4toannexb_filter(), handle_file(), handle_notify(), libschroedinger_encode_frame(), load_textfile(), main(), matroska_decode_buffer(), matroska_deliver_packet(), mkv_add_cuepoint(), mkv_add_seekhead_entry(), mov_build_index(), mov_flush_fragment(), mov_read_extradata(), mov_read_trex(), mov_read_trun(), mxf_add_metadata_set(), mxf_read_partition_pack(), mxf_write_packet(), mxf_write_partition(), new_video_stream(), nut_read_header(), nut_write_packet(), ogg_new_stream(), ogg_restore(), probe_codec(), qt_rtp_parse_packet(), rdt_parse_sdp_line(), realloc_buffer(), realloc_section_array(), reconfigure_at_keyframe(), rtmp_http_write(), rtmp_open(), sample_queue_push(), smacker_read_packet(), tgv_decode_inter(), theora_header(), tm2_read_stream(), update_context_from_user(), update_index(), vc1_decode_frame(), vp56_size_changed(), and xan_decode_frame().

void* av_realloc_f ( void ptr,
size_t  nelem,
size_t  elsize 
)

Allocate or reallocate a block of memory.

This function does the same thing as av_realloc, except:

  • It takes two arguments and checks the result of the multiplication for integer overflow.
  • It frees the input block in case of failure, thus avoiding the memory leak with the classic "buf = realloc(buf); if (!buf) return -1;".

Definition at line 168 of file mem.c.

Referenced by alloc_array_elem(), alloc_table(), avi_read_header(), avi_write_packet(), config_output(), copy_chapters(), decode_frame(), dyn_buf_write(), ff_mov_write_packet(), ffio_rewind_with_probe_data(), fourxm_read_header(), gxf_write_map_packet(), gxf_write_packet(), main(), parse_commands(), parse_forced_key_frames(), parse_intervals(), queue_frames(), and read_whole_file().

void av_free ( void ptr)

Free a memory block which has been allocated with av_malloc(z)() or av_realloc().

Parameters
ptrPointer to the memory block which should be freed.
Note
ptr = NULL is explicitly allowed.
It is recommended that you use av_freep() instead.
See Also
av_freep()

Definition at line 183 of file mem.c.

Referenced by a64multi_close_encoder(), aac_decode_frame(), add_file(), add_pes_stream(), amr_free_context(), ape_tag_read_field(), append_entry(), asf_write_trailer(), asfrtp_free_context(), asfrtp_parse_packet(), atrac3_decode_close(), audio_decode_example(), audio_encode_example(), av_audio_convert_free(), av_audio_fifo_free(), av_bitstream_filter_close(), av_destruct_packet(), av_dict_free(), av_dict_set(), av_dump_format(), av_expr_parse(), av_fft_end(), av_fifo_free(), av_fifo_realloc2(), av_file_unmap(), av_free_packet(), av_freep(), av_hmac_alloc(), av_hmac_free(), av_image_alloc(), av_opt_get_key_value(), av_opt_query_ranges_default(), av_opt_set_bin(), av_opt_set_from_string(), av_parser_close(), av_parser_init(), av_probe_input_buffer(), av_realloc_f(), av_samples_alloc(), av_tree_destroy(), avcodec_alloc_context3(), avcodec_decode_subtitle2(), avfilter_free(), avfilter_get_video_buffer_ref_from_arrays(), avfilter_open(), avfilter_ref_buffer(), avfilter_unref_buffer(), avformat_free_context(), avformat_new_stream(), avi_read_close(), avi_write_trailer(), avio_close(), avio_close_dyn_buf(), avisynth_read_close(), avpicture_free(), avpriv_dv_init_demux(), bfi_decode_close(), buf_free(), build_filter(), caf_write_packet(), callback(), cdxl_decode_end(), celt_header(), channelmap_filter_frame(), close(), close_audio(), close_connection(), close_null_ctx(), close_video(), cmdutils_read_file(), cng_decode_close(), cng_encode_close(), codec_get_buffer(), concat_open(), cond_release_buffer(), convert_str(), cook_decode_close(), copy_frame(), data_open(), decode_end(), decode_frame(), decode_lowdelay(), decode_text_chunk(), decode_thread(), decode_video(), delete_cluts(), delete_objects(), delete_region_display_list(), delete_regions(), dilate_init(), dirac_parse_close(), dnxhd_encode_end(), do_adobe_auth(), do_llnw_auth(), doTest(), doubles2str(), dshow_cycle_formats(), dshow_cycle_pins(), dshow_read_close(), dshow_read_packet(), dv1394_close(), dv_read_close(), dv_read_timecode(), dvbsub_close_decoder(), dvbsub_parse_page_segment(), dvbsub_parse_region_segment(), dvdsub_parse_extradata(), ebml_free(), ebml_read_ascii(), encode_close(), encode_dvd_subtitles(), encode_end(), encode_frame(), encode_picture_ls(), enu_free(), escape124_decode_close(), escape124_decode_frame(), exit_program(), ff_asf_parse_packet(), ff_ass_split_free(), ff_audio_data_alloc(), ff_audio_data_free(), ff_audio_mix_alloc(), ff_audio_mix_free(), ff_audio_mix_set_matrix(), ff_audio_resample_free(), ff_audio_resample_init(), ff_avfilter_default_free_buffer(), ff_cavs_end(), ff_ccitt_unpack(), ff_command_queue_pop(), ff_create_schro_frame(), ff_dct_end(), ff_dct_init(), ff_default_get_video_buffer(), ff_dither_free(), ff_do_elbg(), ff_fast_malloc(), ff_free_mp_image(), ff_free_parser_state(), ff_free_pool(), ff_gen_syncpoint_search(), ff_h264_decode_picture_parameter_set(), ff_h264_decode_seq_parameter_set(), ff_http_auth_create_response(), ff_http_match_no_proxy(), ff_id3v2_parse(), ff_iir_filter_free_coeffs(), ff_iir_filter_free_state(), ff_init_elbg(), ff_init_vlc_sparse(), ff_isom_write_avcc(), ff_jpegls_decode_picture(), ff_mjpeg_decode_end(), ff_mjpeg_encode_close(), ff_mov_add_hinted_packet(), ff_mov_close_hinting(), ff_mov_write_packet(), ff_mp4_read_dec_config_descr(), ff_mpegts_parse_close(), ff_nut_add_sp(), ff_packet_free_side_data(), ff_parse_fmtp(), ff_pca_free(), ff_png_zfree(), ff_psy_preprocess_end(), ff_rdt_parse_close(), ff_read_packet(), ff_restore_parser_state(), ff_rtmp_calc_digest(), ff_rtp_chain_mux_open(), ff_rtp_check_and_send_back_rr(), ff_rtp_parse_close(), ff_rtp_reset_packet_queue(), ff_rtp_send_punch_packets(), ff_rtp_send_rtcp_feedback(), ff_rtsp_close_streams(), ff_rtsp_setup_output_streams(), ff_rtsp_undo_setup(), ff_snow_alloc_blocks(), ff_snow_release_buffer(), ff_store_parser_state(), ff_tls_deinit(), ff_vf_get_image(), ff_vf_next_put_image(), ff_wma_end(), ff_wms_parse_sdp_a_line(), ff_xvid_rate_control_init(), ff_yuv2rgb_c_init_tables(), ffio_fdopen(), ffio_rewind_with_probe_data(), ffio_set_buf_size(), film_read_close(), film_read_header(), film_read_packet(), filter_release_buffer(), find_and_decode_index(), find_motion(), flac_parse(), flac_parse_close(), flac_read_header(), flashsv_decode_end(), flashsv_encode_end(), flv_get_extradata(), flv_queue_extradata(), flv_write_packet(), fourxm_read_header(), frame_list_clear(), frame_list_remove_samples(), free_buffer_pool(), free_context(), free_entries(), free_filter_param(), free_fragment_if_needed(), free_frame_if_needed(), free_geobtag(), free_packet_list(), free_segment_list(), free_temp(), free_tracked_methods(), free_variant_list(), freeBuffers(), frei0r_init(), generate_codebook(), generate_new_codebooks(), get_cookies(), get_meta(), get_metadata(), get_moov_size(), get_private_data(), get_tag(), gif_write_header(), glyph_enu_free(), guess_ni_flag(), h263_free_context(), h263_handle_packet(), h264_free_context(), h264_mp4toannexb_filter(), handle_invoke_error(), handle_invoke_result(), hls_write_header(), hls_write_trailer(), http_connect(), http_parse_request(), http_receive_data(), iec61883_close(), iec61883_parse_queue_dv(), iec61883_parse_queue_hdv(), img_read_header(), init(), init_coef_vlc(), init_cook_mlt(), init_filters(), init_pass2(), init_pattern_from_file(), init_report(), initFilter(), ism_flush(), ism_free(), jacosub_decode_frame(), jpeg_free_context(), latm_decode_audio_specific_config(), latm_free_context(), latm_parse_packet(), lavfi_read_header(), libschroedinger_decode_frame(), libschroedinger_free_frame(), link_filter_inouts(), load_mask(), load_path(), m4sl_cb(), main(), make_digest_auth(), matroska_clear_queue(), matroska_decode_buffer(), matroska_deliver_packet(), matroska_fix_ass_packet(), matroska_merge_packets(), matroska_parse_block(), matroska_parse_frame(), matroska_parse_rm_audio(), matroska_read_close(), matroska_read_header(), mimic_decode_end(), mjpeg_decode_com(), mkv_flush_dynbuf(), mkv_write_attachments(), mkv_write_block(), mkv_write_codecprivate(), mkv_write_seekhead(), mkv_write_trailer(), mmap_close(), mmap_init(), mmap_release_buffer(), mms_close(), mmsh_close(), mmsh_read_seek(), mov_create_chapter_track(), mov_create_timecode_track(), mov_flush_fragment(), mov_read_cmov(), mov_read_dref(), mov_read_dvc1(), mov_read_glbl(), mov_read_packet(), mov_read_strf(), mov_read_stsz(), mov_read_wave(), mov_write_ctts_tag(), mov_write_dvc1_structs(), mov_write_isml_manifest(), mov_write_stts_tag(), mov_write_trailer(), mov_write_udta_tag(), mpc8_parse_seektable(), mpeg_mux_init(), mpegts_close_filter(), mpegts_free_context(), mpegts_open_section_filter(), mpegts_set_stream_info(), mpegts_write_end(), mpegts_write_header(), mpegts_write_packet_internal(), mxf_compute_index_tables(), mxf_get_sorted_table_segments(), mxf_read_generic_descriptor(), mxf_read_local_tags(), new_connection(), new_output_stream(), new_stream(), nsv_parse_NSVf_header(), nsv_read_close(), nut_read_header(), ogg_new_buf(), ogg_read_close(), ogg_read_page(), ogg_restore(), ogg_write_page(), ogm_chapter(), open_null_ctx(), open_slave(), opt_channel_layout(), opt_old2new(), opt_qscale(), opt_show_entries(), opt_show_format_entry(), opt_timecode(), opt_vstats_file(), packet_queue_get(), parse_device_name(), parse_filter(), parse_fmtp_config(), parse_frames(), parse_inputs(), parse_interval(), parse_key_value_pair(), parse_options(), parse_outputs(), parse_setup_header(), parse_times(), parse_video_var(), pcx_decode_frame(), pmt_cb(), pp_free_context(), pp_free_mode(), pp_get_mode_by_name_and_quality(), prepare_sdp_description(), print_codecs(), process_line(), put_packet(), qcelp_free_context(), qdm2_extradata_free(), qt_rtp_free(), qt_rtp_parse_packet(), qtrle_encode_end(), queue_frames(), radix_sort(), rdt_free_context(), rdt_new_context(), read_frame(), read_geobtag(), read_shape_from_file(), read_tag(), read_whole_file(), reallocAlign(), resample_init(), rl2_decode_end(), rl2_read_header(), rm_write_audio(), roq_encode_end(), roq_encode_video(), rtmp_open(), rtp_new_av_stream(), rtp_new_connection(), rtp_parse_mp4_au(), rtp_parse_queued_packet(), rtsp_cmd_describe(), sami_paragraph_to_ass(), sample_queue_free(), sample_queue_pop(), sap_write_header(), sbg_read_header(), sdp_parse_fmtp_config_h264(), sdt_cb(), seg_write_trailer(), segment_list_print_entry(), seq_read_close(), set_params(), set_string_binary(), shift_data(), shorts2str(), show_codecs(), show_stream(), smacker_decode_header_tree(), smacker_read_close(), smacker_read_header(), smka_decode_frame(), sp5x_decode_frame(), Stagefright_decode_frame(), store_in_pool(), stream_close(), stream_open(), sub2video_prepare(), svq1_decode_frame(), svq3_decode_init(), svq3_extradata_free(), svq3_parse_packet(), swri_get_dither(), swri_realloc_audio(), sws_addVec(), sws_convVec(), sws_freeContext(), sws_freeFilter(), sws_freeVec(), sws_scale(), sws_shiftVec(), sws_subVec(), tcp_write_packet(), tgv_decode_end(), thread_entry(), thread_free(), thread_init(), tiff_unpack_strip(), tm2_build_huff_table(), tm2_free_codes(), tqi_decode_end(), transcode(), truemotion1_decode_end(), tta_decode_close(), twin_decode_close(), uninit(), update_context_from_user(), url_open_dyn_buf_internal(), var_read_float(), var_read_int(), vc1_decode_frame(), vc1_decode_init(), vc1_extract_headers(), vfw_read_close(), vfw_read_packet(), video_audio_display(), video_decode_example(), video_encode_example(), videostream_cb(), vmd_read_close(), vmd_read_header(), vmdvideo_decode_end(), vorbis_free(), vorbis_parse_setup_hdr_codebooks(), vp56_size_changed(), vp6_decode_free(), vp8_free_buffer(), vp8_free_context(), vp8_release_frame(), wavesynth_close(), wavesynth_init(), worker(), write_globalinfo(), write_header_chunk(), write_headers(), write_streaminfo(), write_trailer(), wsvqa_read_header(), wtvfile_close(), wtvfile_open_sector(), x11grab_read_header(), X264_close(), XAVS_close(), xiph_free_context(), xiph_parse_fmtp_pair(), xmv_process_packet_header(), and xwma_read_header().

void* av_mallocz ( size_t  size)

Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.

Parameters
sizeSize in bytes for the memory block to be allocated.
Returns
Pointer to the allocated block, NULL if it cannot be allocated.
See Also
av_malloc()

Definition at line 205 of file mem.c.

Referenced by a64multi_init_encoder(), aac_adtstoasc_filter(), aac_decode_frame(), aac_encode_init(), add_av_stream1(), add_codec(), add_fragment(), add_input_streams(), add_pes_stream(), add_to_pktbuf(), add_to_queue(), adx_read_header(), afc_read_header(), aiff_read_header(), aiff_write_packet(), alac_encode_init(), alloc_buffer(), alloc_frame_buffer(), alloc_picture(), alloc_scratch_buffers(), alloc_sequence_buffers(), allocate_buffers(), amr_new_context(), asf_read_stream_properties(), asfrtp_new_context(), atrac3_decode_init(), audio_get_buffer(), av_abuffersink_params_alloc(), av_aes_alloc(), av_audio_fifo_alloc(), av_bitstream_filter_init(), av_calloc(), av_dict_set(), av_dump_format(), av_expr_parse(), av_fifo_alloc(), av_hmac_alloc(), av_md5_alloc(), av_new_program(), av_opt_query_ranges_default(), av_parser_init(), av_sha_alloc(), av_tree_node_alloc(), avcodec_fill_audio_frame(), avcodec_get_context_defaults3(), avcodec_open2(), avfilter_copy_buf_props(), avfilter_get_audio_buffer_ref_from_arrays_channels(), avfilter_get_video_buffer_ref_from_arrays(), avfilter_graph_alloc(), avfilter_graph_queue_command(), avfilter_inout_alloc(), avfilter_link(), avfilter_open(), avformat_alloc_output_context2(), avformat_find_stream_info(), avformat_new_stream(), avformat_open_input(), avi_read_header(), avi_write_header(), avio_alloc_context(), avisynth_read_header(), avpriv_dv_init_demux(), avpriv_new_chapter(), avresample_alloc_context(), avui_encode_init(), bfi_decode_init(), callback(), channelmap_filter_frame(), che_configure(), cng_decode_init(), config(), config_input(), config_output(), configure_filtergraph(), cook_decode_init(), copy_chapters(), decode_dvd_subtitles(), decode_frame(), decode_init(), decode_init_thread_copy(), decode_lowdelay(), decode_main_header(), decode_pic(), decode_picture_header(), decode_stream_header(), decode_thread(), DEF_CHOOSE_FORMAT(), dfa_decode_init(), display_end_segment(), doTest(), dv_read_timecode(), dvbsub_display_end_segment(), dvbsub_parse_display_definition_segment(), dvbsub_parse_page_segment(), dvbsub_parse_region_segment(), encode_init(), encode_picture_ls(), enqueue_packet(), extract_mpeg4_header(), ff_all_channel_counts(), ff_all_channel_layouts(), ff_all_samplerates(), ff_ass_add_rect(), ff_ass_split(), ff_audio_data_alloc(), ff_audio_mix_alloc(), ff_audio_resample_init(), ff_avc_write_annexb_extradata(), ff_cavs_init_top_lines(), ff_create_schro_frame(), ff_default_get_audio_buffer(), ff_default_get_video_buffer(), ff_dither_alloc(), ff_er_frame_end(), ff_fast_malloc(), ff_frame_thread_encoder_init(), ff_generate_avci_extradata(), ff_h264_decode_picture_parameter_set(), ff_h264_decode_seq_parameter_set(), ff_huffyuv_alloc_temp(), ff_iir_filter_init_state(), ff_interleave_add_packet(), ff_intrax8_common_init(), ff_ivi_init_planes(), ff_ivi_init_tiles(), ff_j2k_tag_tree_init(), ff_jpegls_decode_picture(), ff_lpc_init(), ff_lzw_decode_open(), ff_merge_channel_layouts(), ff_mjpeg_decode_sof(), ff_mp4_read_dec_config_descr(), ff_mpegts_parse_open(), ff_nut_add_sp(), ff_pca_init(), ff_psy_init(), ff_psy_preprocess_init(), ff_rate_control_init(), ff_rdt_parse_open(), ff_rm_alloc_rmstream(), ff_rtp_parse_open(), ff_rtsp_setup_output_streams(), ff_schro_queue_push_back(), ff_slice_buffer_init(), ff_snow_alloc_blocks(), ff_snow_common_init_after_header(), ff_timefilter_new(), ff_vc1_decode_init_alloc_tables(), ff_vf_next_put_image(), ff_wms_parse_sdp_a_line(), ffurl_register_protocol(), ffv1_init_slice_contexts(), find_headers_search_validate(), flac_read_header(), flashsv2_encode_init(), flashsv_decode_frame(), flashsv_encode_frame(), flashsv_encode_init(), flv_get_extradata(), flv_queue_extradata(), flv_write_header(), frame_thread_init(), g722_encode_init(), get_buffer(), get_http_header_data(), get_private_data(), get_siz(), gif_encode_init(), guess_ni_flag(), gxf_write_header(), h263_new_context(), h264_new_context(), h264_slice_header_init(), handle_file(), http_prepare_data(), http_server(), ico_write_header(), iec61883_callback(), init(), init_er(), init_input_filter(), init_muxer(), init_parse_context(), init_pattern_from_file(), init_pattern_from_string(), ism_write_header(), join_config_output(), join_init(), join_request_frame(), jpeg_new_context(), latm_new_context(), lavfi_read_header(), libopus_encode_init(), libschroedinger_encode_frame(), link_filter_inouts(), load_glyph(), main(), make_format_list(), matroska_parse_frame(), matroska_parse_laces(), matroska_parse_rm_audio(), matroska_read_header(), mj2_create_image(), mkv_start_cues(), mkv_start_seekhead(), mkv_write_header(), mmap_init(), mmsh_open_internal(), mov_read_chapters(), mov_read_covr(), mov_read_dref(), mov_read_dvc1(), mov_read_glbl(), mov_read_strf(), mov_read_trak(), mov_read_wave(), mov_text_encode_init(), mov_write_dvc1_structs(), mov_write_header(), mp_decode_init(), mpc8_read_header(), mpc_read_header(), mpeg_mux_init(), mpeg_mux_write_packet(), mpegts_add_service(), mpegts_new_context(), mpegts_open_pes_filter(), mpegts_open_section_filter(), mpegts_write_header(), mss2_decode_init(), mxf_parse_structural_metadata(), mxf_read_local_tags(), mxf_write_header(), mxpeg_decode_mxm(), new_connection(), new_context(), new_eval_expr(), new_output_stream(), new_stream(), new_variant(), new_video_stream(), nsv_parse_NSVf_header(), nsv_parse_NSVs_header(), nut_read_header(), nut_write_header(), ogg_buffer_page(), ogg_build_flac_headers(), ogg_build_opus_headers(), ogg_build_speex_headers(), ogg_save(), ogg_write_header(), ogg_write_vorbiscomment(), oma_read_header(), opaque_list_push(), open_input_file(), open_output_file(), opt_channel_layout(), opt_filter_complex(), opus_header(), paf_vid_init(), parse_acl_row(), parse_dynamic_acl(), parse_ffconfig(), parse_fmtp_config(), parse_inputs(), parse_keyframes_index(), parse_primary(), parse_sws_flags(), prepare_sdp_description(), psy_3gpp_init(), pthread_cond_init(), pthread_create(), put_main_header(), qcelp_new_context(), qdm2_extradata_new(), qdm2_parse_config(), qt_rtp_new(), qt_rtp_parse_packet(), qtrle_encode_init(), rdt_new_context(), rdt_parse_b64buf(), read_apic(), read_geobtag(), read_header(), read_kuki_chunk(), read_shape_from_file(), read_tfra(), ready_codebook(), ready_residue(), reallocAlign(), resample_init(), rl2_decode_init(), rl2_read_header(), roq_encode_init(), rtp_new_av_stream(), rtp_new_connection(), rtsp_read_header(), rv34_decoder_alloc(), sap_write_header(), segment_end(), setup_find_stream_info_opts(), smacker_decode_header_tree(), smka_decode_frame(), sp5x_decode_frame(), speex_header(), Stagefright_close(), Stagefright_decode_frame(), Stagefright_init(), stream_open(), svq1_encode_init(), svq1_encode_plane(), svq3_decode_init(), svq3_extradata_new(), swr_alloc(), swri_realloc_audio(), swri_rematrix_init(), swri_rematrix_init_x86(), sws_alloc_context(), theora_header(), thread_init(), tiff_decode_tag(), tm2_build_huff_table(), transcode_init(), tta_decode_init(), tta_read_header(), update_dimensions(), url_alloc_for_protocol(), url_open_dyn_buf_internal(), utvideo_encode_init(), vc1_decode_frame(), vc1_decode_init(), vc1_extract_headers(), vda_decoder_callback(), vf_open(), video_get_buffer(), videostream_cb(), vmd_read_header(), vorbis_header(), vorbis_parse_id_hdr(), vorbis_parse_setup_hdr_codebooks(), vorbis_parse_setup_hdr_floors(), vorbis_parse_setup_hdr_mappings(), vorbis_parse_setup_hdr_modes(), vorbis_parse_setup_hdr_residues(), vp6_decode_init(), vp8_alloc_frame(), vp8_new_context(), wmv2_encode_init(), worker(), writer_open(), wsvqa_read_header(), wsvqa_read_packet(), wtvfile_open_sector(), wv_alloc_frame_context(), XAVS_init(), xiph_new_context(), xwma_read_header(), and yop_read_header().

void* av_calloc ( size_t  nmemb,
size_t  size 
)

Allocate a block of nmemb * size bytes with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block.

The allocation will fail if nmemb * size is greater than or equal to INT_MAX.

Parameters
nmemb
size
Returns
Pointer to the allocated block, NULL if it cannot be allocated.

Definition at line 213 of file mem.c.

Referenced by concat_channels_lists(), config_audio_output(), config_props(), config_video_output(), encode_dvd_subtitles(), ff_avfilter_graph_config_pointers(), get_codecs_sorted(), get_histogram(), init(), movie_common_init(), mxf_compute_index_tables(), mxf_compute_ptses_fake_index(), mxf_get_sorted_table_segments(), mxf_read_content_storage(), mxf_read_generic_descriptor(), mxf_read_index_entry_array(), mxf_read_material_package(), mxf_read_primer_pack(), mxf_read_sequence(), mxf_read_source_package(), probe_file(), resample_init(), and wavesynth_parse_extradata().

return av_mallocz ( nmemb *  size)
char* av_strdup ( const char *  s)
void av_freep ( void ptr)

Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer pointing to it to NULL.

Parameters
ptrPointer to the pointer to the memory block which should be freed.
See Also
av_free()

Definition at line 198 of file mem.c.

Referenced by aac_decode_close(), aac_encode_close(), aac_encode_end(), aacPlus_encode_close(), add_doubles_metadata(), add_shorts_metadata(), adpcm_encode_close(), adx_read_header(), aiff_write_packet(), aiff_write_trailer(), alac_decode_close(), alac_encode_close(), alloc_buffer(), alloc_frame_buffer(), alloc_scratch_buffers(), amr_wb_encode_close(), ape_decode_close(), ape_read_close(), ape_tag_read_field(), asf_read_picture(), asf_read_stream_properties(), asf_write_header1(), asfrtp_free_context(), asfrtp_parse_packet(), asink_uninit(), atrac3_decode_init(), audio_encode_example(), audio_free_buffers(), audio_get_buffer(), av_asprintf(), av_bitstream_filter_close(), av_bprint_finalize(), av_dict_free(), av_dict_set(), av_expr_free(), av_fast_padded_malloc(), av_fast_padded_mallocz(), av_fft_init(), av_fifo_alloc(), av_fifo_free(), av_free_packet(), av_opt_free(), av_opt_freep_ranges(), av_parser_init(), av_probe_input_buffer(), av_tempfile(), av_write_trailer(), avcodec_close(), avcodec_copy_context(), avcodec_encode_audio2(), avcodec_fill_audio_frame(), avcodec_free_frame(), avcodec_get_frame_defaults(), avcodec_open2(), avfilter_copy_buffer_ref_props(), avfilter_copy_frame_props(), avfilter_free(), avfilter_get_audio_buffer_ref_from_arrays_channels(), avfilter_graph_free(), avfilter_graph_parse(), avfilter_graph_parse2(), avfilter_inout_free(), avfilter_link_free(), avfilter_open(), avfilter_ref_buffer(), avfilter_unref_buffer(), avformat_find_stream_info(), avformat_free_context(), avi_read_close(), avi_read_header(), avi_write_trailer(), avio_close(), avresample_close(), avresample_free(), avresample_set_matrix(), avsubtitle_free(), avui_decode_close(), avui_encode_close(), bmv_read_close(), build_feed_streams(), caca_write_trailer(), cache_open(), caf_write_trailer(), calc_rice_params(), che_configure(), clean_files(), cleanup(), clear_programs(), cllc_decode_close(), close_connection(), close_decoder(), codec_get_buffer(), concat_close(), concat_open(), concat_read_close(), cond_release_buffer(), config_output(), configure_input_filter(), configure_output_audio_filter(), configure_output_filter(), configure_output_video_filter(), copy_parameter_set(), crypto_close(), data_close(), dca_decode_end(), decode(), decode_close(), decode_dvd_subtitles(), decode_end(), decode_frame(), decode_init(), decode_packet(), decode_picture_header(), decode_slice_header(), decode_str(), decode_update_thread_context(), destroy_buffers(), dfa_decode_end(), dnxhd_encode_end(), do_exit(), doTest(), dvbsub_close_decoder(), dvbsub_parse_close(), dvdsub_parse(), dvdsub_parse_close(), ebml_free(), ebml_read_binary(), eightsvx_decode_close(), eightsvx_decode_frame(), encode_close(), encode_end(), encode_init(), encode_nals(), encode_picture(), encode_picture_ls(), escape130_decode_close(), estimate_best_b_count(), exit_program(), expand_function(), extract_header(), extract_mpeg4_header(), Faac_encode_close(), ff_ac3_encode_close(), ff_ac3_float_mdct_end(), ff_af_queue_close(), ff_alsa_close(), ff_ass_split_free(), ff_audio_data_free(), ff_audio_data_realloc(), ff_audio_mix_alloc(), ff_audio_mix_free(), ff_audio_resample_free(), ff_avc_parse_nal_units_buf(), ff_avfilter_default_free_buffer(), ff_bgmc_end(), ff_cavs_end(), ff_command_queue_pop(), ff_default_get_audio_buffer(), ff_dither_free(), ff_fft_end(), ff_fft_init(), ff_frame_thread_encoder_free(), ff_free_pool(), ff_free_stream(), ff_free_vlc(), ff_generate_avci_extradata(), ff_h264_free_context(), ff_huffyuv_common_end(), ff_id3v2_free_extra_meta(), ff_id3v2_write_apic(), ff_init_vlc_sparse(), ff_interleave_packet_per_dts(), ff_intrax8_common_end(), ff_ivi_init_tiles(), ff_j2k_cleanup(), ff_j2k_dwt_destroy(), ff_load_image(), ff_lpc_end(), ff_lzw_decode_close(), ff_mdct_end(), ff_merge_channel_layouts(), ff_merge_formats(), ff_merge_samplerates(), ff_mjpeg_decode_end(), ff_mjpeg_decode_sof(), ff_mms_read_header(), ff_mov_add_hinted_packet(), ff_mov_close_hinting(), ff_mov_init_hinting(), ff_MPV_common_end(), ff_MPV_common_frame_size_change(), ff_MPV_encode_end(), ff_mpv_frame_size_alloc(), ff_mss12_decode_end(), ff_packet_free_side_data(), ff_parse_close(), ff_pca_free(), ff_psy_end(), ff_psy_preprocess_end(), ff_rate_control_uninit(), ff_rtmp_packet_destroy(), ff_rtsp_setup_input_streams(), ff_schro_queue_pop(), ff_slice_buffer_destroy(), ff_slice_buffer_init(), ff_sndio_close(), ff_sndio_open(), ff_snow_common_end(), ff_snow_common_init_after_header(), ff_srtp_free(), ff_subtitles_queue_clean(), ff_thread_video_encode_frame(), ff_timefilter_destroy(), ff_vaapi_common_end_frame(), ff_vc1_decode_end(), ff_vda_create_decoder(), ff_vda_destroy_decoder(), ff_vorbis_comment(), ff_vp56_free_context(), ff_wma_end(), ffio_rewind_with_probe_data(), ffm_close(), ffurl_closep(), ffv1_close(), find_smallest_bounding_rectangle(), fixup_vorbis_headers(), flac_decode_close(), flac_encode_close(), flac_parse(), flac_parse_close(), flac_read_header(), flac_write_block_comment(), flashsv_decode_frame(), flv_read_close(), flv_read_packet(), fourxm_read_close(), fourxm_read_header(), frame_thread_free(), free_acl_list(), free_apic(), free_buffer_pool(), free_buffers(), free_bundles(), free_coded_frame(), free_context_frame(), free_duplicate_context(), free_frame_buffer(), free_frame_buffers(), free_geotags(), free_packet_buffer(), free_picture(), free_schro_frame(), free_script(), free_section(), free_segment_list(), free_sequence_buffers(), free_tables(), free_variant_list(), g722_encode_close(), generate_dither_noise(), get_codec_data(), get_cookies(), get_http_header_data(), get_tag(), get_tcp_server_response(), gif_decode_close(), gif_encode_close(), glyph_enu_free(), guess_dc(), gxf_write_trailer(), h264_decode_end(), h264_mp4toannexb_filter(), handle_connection(), handle_file(), handle_packets(), hls_read_header(), http_connect(), http_prepare_data(), http_send_data(), ico_write_trailer(), id3v2_put_ttag(), ilbc_encode_close(), init(), init_er(), init_pattern_from_file(), initFilter(), ism_free(), ivi_free_buffers(), join_config_output(), join_free_buffer(), join_request_frame(), join_uninit(), lag_decode_end(), latm_parse_packet(), lavfi_read_close(), lavfi_read_header(), libgsm_encode_close(), libopenjpeg_encode_close(), libopenjpeg_encode_init(), libopus_encode_close(), libopus_encode_init(), libschroedinger_decode_buffer_free(), libschroedinger_decode_close(), libschroedinger_encode_close(), libschroedinger_encode_frame(), libschroedinger_free_frame(), load_glyph(), main(), matroska_clear_queue(), matroska_deliver_packet(), md5_close(), mj2_create_image(), mjpega_dump_header(), mkv_write_simpletag(), mkv_write_trailer(), mmsh_open_internal(), mmsh_read_seek(), modplug_read_close(), mov_read_chapters(), mov_read_close(), mov_read_ctts(), mov_read_ftyp(), mov_read_hdlr(), mov_read_stsz(), mov_read_trak(), mov_write_header(), mov_write_trailer(), movie_uninit(), mp3_queue_flush(), mp3lame_encode_close(), mp_decode_end(), MPA_encode_close(), mpc7_decode_close(), mpc_read_close(), mpegts_close_filter(), mpegts_write_end(), mpegts_write_header(), mss2_decode_end(), mss3_decode_end(), mss3_decode_init(), mss4_decode_end(), mvc_decode_end(), mxf_compute_ptses_fake_index(), mxf_free(), mxf_get_sorted_table_segments(), mxf_interleave_get_packet(), mxf_read_close(), mxf_write_footer(), mxg_close(), mxpeg_decode_end(), mxpeg_decode_mxm(), new_stream(), nsv_read_close(), nut_read_close(), nut_write_header(), nut_write_trailer(), ogg_new_stream(), ogg_replace_stream(), ogg_write_header(), ogg_write_pages(), ogg_write_trailer(), oggvorbis_encode_close(), open_input_file(), opt_map(), packet_queue_flush(), pad_last_frame(), paf_vid_close(), parse_command(), parse_ffconfig(), parse_fmtp_config(), parse_iplconvkernel(), parse_key_value_pair(), parse_keyframes_index(), parse_link_name(), parse_picture(), parse_presentation_segment(), parse_primary(), parse_sws_flags(), pcm_encode_close(), pmp_close(), print_sdp(), probe_codec(), probe_file(), prores_encode_close(), psy_3gpp_end(), pthread_cond_destroy(), put_str16(), qdm2_parse_config(), qt_rtp_free(), qt_rtp_parse_packet(), queue_pop(), r3d_close(), ra144_encode_close(), raw_close_decoder(), rdt_free_context(), rdt_parse_packet(), CustomSource::read(), read_apic(), read_close(), read_frame(), read_from_packet_buffer(), read_gab2_sub(), read_header(), read_kuki_chunk(), read_thread(), read_ttag(), realloc_buffer(), release_queued_segmaps(), remove_decoded_packets(), resample_free(), roq_dpcm_encode_close(), rtmp_calc_swfhash(), rtmp_close(), rtmp_http_close(), rtmp_open(), rtp_write_trailer(), rtsp_read_close(), rv34_decoder_free(), sample_queue_free(), sap_read_close(), sap_write_close(), sap_write_header(), sbg_read_header(), sdl_write_trailer(), sdp_parse_fmtp_config_h264(), seg_write_trailer(), segment_end(), set_string(), set_string_binary(), sgirle_decode_end(), shorten_decode_close(), show_help(), smjpeg_read_header(), sox_read_header(), spdif_write_trailer(), split_uninit(), Stagefright_close(), Stagefright_decode_frame(), Stagefright_init(), stop_jack(), store_in_pool(), stream_component_close(), sunrast_decode_frame(), svq1_encode_end(), svq3_decode_end(), svq3_decode_init(), svq3_parse_packet(), swf_read_packet(), swr_free(), swri_rematrix_free(), sws_allocVec(), sws_freeContext(), sws_freeVec(), tak_decode_close(), tak_read_header(), tee_write_header(), tgv_decode_frame(), thread_free(), tiff_decode_tag(), tiff_end(), transcode(), tscc2_decode_end(), tta_decode_close(), tta_decode_init(), udp_open(), uninit(), uninit_options(), uninit_parse_context(), url_alloc_for_protocol(), utvideo_decode_close(), utvideo_encode_close(), v308_decode_close(), v308_encode_close(), v408_decode_close(), v408_encode_close(), v410_decode_close(), v410_encode_close(), vble_decode_close(), vfw_read_header(), vid_read_close(), vid_read_packet(), video_encode_example(), video_free_buffers(), video_get_buffer(), vorbis_cleanup(), vorbis_encode_close(), vorbis_free(), vorbis_header(), vp3_decode_end(), vp8_free(), vqa_decode_end(), vqa_decode_init(), vsink_uninit(), wavpack_decode_end(), worker(), write_chapter(), write_headers(), writer_close(), wtvfile_close(), x11grab_read_header(), X264_close(), xan_decode_end(), xan_decode_init(), XAVS_close(), xbm_decode_close(), xbm_encode_close(), xface_encode_close(), xiph_handle_packet(), xmv_read_close(), xvid_encode_close(), xwd_decode_close(), xwd_encode_close(), y216_decode_close(), y41p_decode_close(), y41p_encode_close(), yae_release_buffers(), yuv4_decode_close(), yuv4_encode_close(), zero12v_decode_close(), and zerocodec_decode_close().

void av_dynarray_add ( void tab_ptr,
int *  nb_ptr,
void elem 
)

Add an element to a dynamic array.

Parameters
tab_ptrPointer to the array.
nb_ptrPointer to the number of elements in the array.
elemElement to be added.

Definition at line 233 of file mem.c.

static int av_size_mult ( size_t  a,
size_t  b,
size_t *  r 
)
inlinestatic

Multiply two size_t values checking for overflow.

Returns
0 if success, AVERROR(EINVAL) if overflow.

Definition at line 204 of file mem.h.

Referenced by av_realloc_f(), config_output(), decode_frame(), and ogg_new_stream().

void av_max_alloc ( size_t  max)

Set the maximum size that may me allocated in one block.

Definition at line 69 of file mem.c.

Referenced by main(), and opt_max_alloc().

void av_memcpy_backptr ( uint8_t dst,
int  back,
int  cnt 
)

deliberately overlapping memcpy implementation

Parameters
dstdestination buffer
backhow many bytes back we start (the initial size of the overlapping window), must be > 0
cntnumber 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 327 of file mem.c.

Referenced by copy_backptr(), decode_dsw1(), decode_frame(), decode_tsw1(), mszh_decomp(), residual_interp(), synth_block_fcb_acb(), unpack(), and xan_unpack().

Variable Documentation

size_t size
Initial value:
{
if (size <= 0 || nmemb >= INT_MAX / size)
return NULL

Definition at line 95 of file mem.h.

size_t size
Initial value:
{
if (size <= 0 || nmemb >= INT_MAX / size)
return NULL

Definition at line 11127 of file twinvq_data.h.

Referenced by aac_parse_packet(), aac_sync(), abs_pow34_v(), adaptive_gain_control(), add_fragment(), add_metadata_from_side_data(), adpcm_swf_decode(), adx_read_packet(), afc_read_packet(), aiff_read_header(), aiff_read_packet(), alloc_table(), amr_read_packet(), amr_wb_encode_frame(), ape_tag_read_field(), append(), apply_param_change(), apply_tns(), asf_read_ext_stream_properties(), asf_read_frame_header(), ass_decode_frame(), ast_read_packet(), ast_write_packet(), audio_write_packet(), av_audio_fifo_drain(), av_audio_fifo_read(), av_audio_fifo_write(), av_bprint_init_for_buffer(), av_fifo_alloc(), av_fifo_drain(), av_fifo_generic_write(), av_get_packet(), av_image_copy_to_buffer(), av_image_fill_pointers(), av_new_packet(), av_packet_merge_side_data(), av_packet_new_side_data(), av_packet_shrink_side_data(), av_packet_split_side_data(), av_parser_change(), av_realloc_f(), av_samples_alloc(), av_shrink_packet(), avi_load_index(), avi_read_header(), avi_read_nikon(), avi_read_packet(), avi_read_tag(), avi_sync(), avi_write_packet(), avio_close_dyn_buf(), avio_read(), avio_size(), avpriv_aac_parse_header(), avpriv_dv_get_packet(), avpriv_dv_produce_packet(), avs_read_audio_packet(), avs_read_packet(), avui_encode_frame(), block_sse(), bytestream2_get_bufferu(), bytestream2_put_bufferu(), bytestream2_set_bufferu(), bytestream2_skipu(), bytestream_get_buffer(), bytestream_put_buffer(), calc_deflate_block_size(), check_bidir_mv(), check_checksum(), cinepak_decode_codebook(), cinepak_decode_strip(), cinepak_decode_vectors(), clean_index(), cmp_inline(), cmv_decode_frame(), codebook_trellis_rate(), commit_bitstream_and_slice_buffer(), compute_avg_bitrate(), concat_open(), concat_seek(), construct_perm_table(), copy_tag(), crypto_read(), data_read(), daud_packet(), dca_subsubframe(), dca_xbr_parse_frame(), dec_lpc_spectrum_inv(), decode_copy(), decode_deep_rle32(), decode_frame(), decode_frame_header(), decode_scaling_list(), decode_subframe(), decode_unregistered_user_data(), dshow_cycle_formats(), dump_extradata(), dv1394_read_packet(), dv_encode_ac(), dv_extract_audio(), dv_extract_video_info(), dv_frame_offset(), dv_inject_audio(), dv_read_packet(), dv_vlc_map_tableinit(), dv_work_pool_size(), dxa_read_header(), dxa_read_packet(), dxva2_h264_decode_slice(), dxva2_mpeg2_decode_slice(), dxva2_vc1_decode_slice(), encode_block(), encode_frame(), encode_init(), encode_nals(), encode_picture_ls(), encode_window_bands_info(), epzs_motion_search2(), epzs_motion_search4(), epzs_motion_search_internal(), escape_FF(), eval_lpcenv_or_interp(), event_loop(), extend_af(), extract_mpeg4_header(), ff_adaptive_gain_control(), ff_add_index_entry(), ff_add_param_change(), ff_alloc_packet2(), ff_alsa_extend_reorder_buf(), ff_amf_get_field_value(), ff_amf_tag_contents(), ff_amf_tag_size(), ff_ass_split_override_codes(), ff_avc_parse_nal_units(), ff_dxva2_commit_buffer(), ff_er_frame_end(), ff_generate_avci_extradata(), ff_h264_decode_extradata(), ff_h264_decode_sei(), ff_huff_gen_len_table(), ff_interleave_new_audio_packet(), ff_isom_write_avcc(), ff_mjpeg_decode_sof(), ff_mov_add_hinted_packet(), ff_mov_read_stsd_entries(), ff_mov_write_packet(), ff_mpeg4_init_partitions(), ff_pcm_read_packet(), ff_print_debug_info2(), ff_raw_read_partial_packet(), ff_rm_read_mdpr_codecdata(), ff_rtmp_packet_create(), ff_rtmp_packet_read_internal(), ff_rtmp_packet_write(), ff_rtp_send_aac(), ff_rtp_send_amr(), ff_rtp_send_h264(), ff_rtp_send_jpeg(), ff_rtp_send_mpegvideo(), ff_rtp_send_xiph(), ff_rv34_decode_frame(), ff_set_min_dist_lsf(), ff_vaapi_alloc_slice(), ff_vdpau_add_buffer(), ff_vf_mpi_clear(), ff_voc_get_packet(), ff_vorbis_comment(), ffio_limit(), ffio_read_partial(), ffm2_read_header(), ffm_read_data(), ffm_read_packet(), ffm_write_data(), ffurl_size(), fill_random(), fill_rectangle(), fill_slice(), fill_slice_long(), fill_slice_short(), find_best_tables(), find_frame_end(), find_headers_search(), find_headers_search_validate(), find_new_headers(), flashsv2_prime(), flashsv_decode_frame(), flush_encoders(), flush_packet(), flv_get_extradata(), flv_queue_extradata(), flv_read_packet(), flv_write_packet(), fourxm_read_header(), fourxm_read_packet(), full_search(), funny_diamond_search(), g723_1_read_packet(), get_codec_data(), get_mb_score(), get_packetheader(), get_private_data(), get_size_of_code(), get_tag(), gif_image_write_image(), gsm_read_packet(), guess_ni_flag(), gxf_write_mpeg_auxiliary(), h263_mv4_search(), h264_idct_dc_add_internal(), hex_dump_internal(), hex_search(), hpel_motion_search(), http_buf_read(), http_send_data(), http_write(), iec61883_parse_queue_dv(), iec61883_parse_queue_hdv(), iec61883_read_packet(), imdct_and_window(), img_read_packet(), infer_size(), ingenient_read_packet(), init_h263_dc_for_msmpeg4(), init_uni_dc_tab(), interlaced_search(), interpolate(), ism_flush(), jpeg_put_comments(), jpeg_table_header(), kalman_smoothen(), klv_decode_ber_length(), klv_encode_ber_length(), l2s_dia_search(), lavfi_read_packet(), linear_perm(), lpc_weighting(), lvf_read_header(), lvf_read_packet(), main(), matroska_parse_laces(), matroska_probe(), md5_write(), memcpy_rgb332_to_bgr8(), merge(), mkv_blockgroup_size(), mkv_write_ass_blocks(), mkv_write_block(), mmf_read_header(), mmf_read_packet(), mms_put_utf16(), mov_build_index(), mov_create_chapter_track(), mov_read_dref(), mov_read_extradata(), mov_read_glbl(), mov_write_dvc1_structs(), mov_write_edts_tag(), mov_write_isml_manifest(), mov_write_meta_tag(), mov_write_single_packet(), mov_write_string_data_tag(), mov_write_string_tag(), mov_write_tfrf_tag(), mov_write_tmpo_tag(), mov_write_traf_tag(), mov_write_trailer(), mov_write_trkn_tag(), mov_write_udta_tag(), mp3_parse_vbr_tags(), mp3_read_packet(), mp_get_code(), mpc8_handle_chunk(), mpc8_parse_seektable(), mpc8_probe(), mpc8_read_header(), mpc8_read_packet(), mpc_read_packet(), mpeg4_encode_dc(), mpeg_mux_write_packet(), mpegps_read_pes_header(), mpegts_probe(), mpegts_write_packet_internal(), msnwc_tcp_read_packet(), mxf_compute_sample_count(), mxf_decrypt_triplet(), mxf_read_generic_descriptor(), mxf_read_local_tags(), mxf_read_packet(), mxf_read_partition_pack(), mxf_read_sync(), mxf_write_local_tag_utf16(), mxg_read_packet(), nc_probe(), nc_read_packet(), nsv_parse_NSVf_header(), nuv_packet(), nuv_read_dts(), ogg_get_length(), ogg_new_buf(), ogg_new_stream(), ogg_read_page(), ogg_write_page(), ogg_write_vorbiscomment(), ogm_header(), output_immediate(), parse_adts_frame_header(), parse_chunks(), parse_forced_key_frames(), parse_packet(), pmp_header(), png_choose_filter(), png_filter_row(), png_write_row(), poll_frame(), postfilter(), predictor(), process_block(), process_ea_header(), propagate_block_data(), put_id3v2_tags(), put_meta(), put_qcd(), put_system_header(), qcp_read_header(), qdm2_decode_init(), qpel_motion_search(), quantize_and_encode_band_cost_template(), quantize_bands(), queue_frames(), r3d_read_reda(), rac_init(), radix_count(), radix_sort_pass(), raw_read_packet(), rdt_load_mdpr(), read_arbitary(), read_header(), read_index(), read_kuki_chunk(), read_packet(), read_shape_from_file(), read_table(), read_tfra(), read_tree(), read_whole_file(), reorder_pixels(), resample(), rl2_rle_decode(), rm_read_index(), rm_write_audio(), roq_encode_frame(), rso_read_header(), rtmp_http_write(), rtmp_read(), rtmp_write(), rtmpe_write(), rtp_send_mpegaudio(), rtp_send_mpegts_raw(), rtp_send_raw(), rtp_send_samples(), rtp_write_packet(), rv10_decode_frame(), rv10_write_header(), rv34_gen_vlc(), sab_diamond_search(), sample_queue_push(), search_for_quantizers_faac(), set_put_bits_buffer_size(), setup_partitions(), show_format(), siff_read_packet(), smacker_read_packet(), small_diamond_search(), smjpeg_read_packet(), smush_read_header(), smush_read_packet(), spdif_header_dts(), squared_diff_macroblock(), srt_decode_frame(), srt_write_packet(), srtp_write(), ssd_int8_vs_int16_altivec(), ssd_int8_vs_int16_c(), svq3_decode_init(), swr_convert(), synth_block_fcb_acb(), synth_block_hardcoded(), tak_read_header(), tcp_write_packet(), thp_read_packet(), tiff_unpack_strip(), tscc2_decode_frame(), tta_read_header(), tta_read_packet(), udp_read(), umh_search(), unpack(), unpack_codebook(), update_sample_display(), updatePacketSize(), var_diamond_search(), vb_decode_palette(), vc1_decode_frame(), vc1_decode_init(), vc1_extract_headers(), vc1_unescape_buffer(), very_broken_op(), video_get_buffer(), vmd_read_header(), vp6_build_huff_tree(), vqf_read_header(), vqf_read_packet(), w_c(), wavpack_decode_block(), wc3_read_header(), wc3_read_packet(), wmavoice_decode_packet(), write_packet(), write_root_table(), ws_snd_decode_frame(), wv_read_block_header(), wv_read_packet(), xan_decode_frame(), xan_unpack(), xan_wc3_decode_frame(), XAVS_init(), xbm_encode_frame(), xwma_read_header(), and xwma_read_packet().