On Wed, Sep 11, 2019 at 11:08:01 -0300, James Almer wrote: > > +static int streamhash_init(struct AVFormatContext *s) > > +{ > > + int res, i; > > + struct HashContext *c = s->priv_data; > > + c->per_stream = 1; > > + c->hashes = av_mallocz_array(s->nb_streams, sizeof(c->hashes)); > > + if (!c->hashes) > > + return AVERROR(ENOMEM); > > + for (i = 0; i < s->nb_streams; i++) { > > + res = av_hash_alloc(&c->hashes[i], c->hash_name); > > + if (res < 0) { > > + hash_free(s); > > No need to call this. It's done automatically by the generic code when > this function returns an error.
Nice. I actually thought that, from your comment on patch 2/3. Will resubmit (including 1/3, for completeness' sake) in a moment. Thanks for the feedback, 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".