On 7/23/2020 7:26 PM, Mohammad Izadi wrote: >>> void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t >> min_size) >>> { >>> @@ -2346,3 +2359,170 @@ int ff_int_from_list_or_default(void *ctx, const >> char * val_name, int val, >>> "%s %d are not supported. Set to default value : %d\n", >> val_name, val, default_value); >>> return default_value; >>> } >>> + >>> +int ff_read_itu_t_t35_to_dynamic_hdr_plus(void *gbc, AVBufferRef >> *output) >> >> Unless this is used by other decoders, it should not be added to utils.c >> Put it in hevc_sei.c >> > Yes, we are going to use it for matroka in avf.
If you need to share this function between libraries, then it needs to use the avpriv prefix, and must not use a pointer to a GetBitContext. See how avpriv_ac3_parse_header() and ff_ac3_parse_header() are handled for an example of this. You'd need to do something like: > int ff_read_itu_t_t35_to_dynamic_hdr_plus(GetBitContext *gbc, AVBufferRef > *output) > { > [...] > } > > int avpriv_read_itu_t_t35_to_dynamic_hdr_plus(const uint8_t *buf, int size, > AVBufferRef *output) > { > GetBitContext gb; > int ret = init_get_bits8(&gb, buf, size); > if (ret < 0) > return ret; > return ff_read_itu_t_t35_to_dynamic_hdr_plus(&gb, output); > } Also, please move this code to its own file within lavc, instead of adding it to utils.c _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".