On Sun, Aug 11, 2019 at 15:57:46 +0200, Nicolas George wrote: > > + c->hashes = av_malloc_array(1, sizeof(c->hashes)); > > + if (!c->hashes) > > + return AVERROR(ENOMEM); > > + res = av_hash_alloc(&c->hashes[0], c->hash_name); > > + if (res < 0) { > > + av_freep(&c->hashes); > > Maybe move all the freing code in a deinit() function?
Sure, I'll have a look how the other muxers do it. The code is later allocating hashes av_hash_alloc() in a loop over nb_streams. If this fails (i.e. out of memory) along the way, do I need to remember how many succeeded before? (See patch 4/4.) Or can I just av_hash_freep() each one in the array, regardsless? Grateful for any other reviews, thanks, Moritz _______________________________________________ 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".