Re: [FFmpeg-devel] [PATCH v2 2/3] avformat/hashenc: use an array of hashes

2019-09-11 Thread James Almer
On 9/11/2019 10:53 AM, Moritz Barsnick wrote: > On Wed, Sep 11, 2019 at 10:39:40 -0300, James Almer wrote: >> On 9/11/2019 10:34 AM, Moritz Barsnick wrote: >>> +static void hash_free(struct AVFormatContext *s) >>> +{ >>> +struct HashContext *c = s->priv_data; >>> +av_hash_freep(&c->hashes[0

Re: [FFmpeg-devel] [PATCH v2 2/3] avformat/hashenc: use an array of hashes

2019-09-11 Thread Moritz Barsnick
On Wed, Sep 11, 2019 at 10:39:40 -0300, James Almer wrote: > On 9/11/2019 10:34 AM, Moritz Barsnick wrote: > > +static void hash_free(struct AVFormatContext *s) > > +{ > > +struct HashContext *c = s->priv_data; > > +av_hash_freep(&c->hashes[0]); > > AVOutputFormat.deinit() is called when AV

Re: [FFmpeg-devel] [PATCH v2 2/3] avformat/hashenc: use an array of hashes

2019-09-11 Thread James Almer
On 9/11/2019 10:34 AM, Moritz Barsnick wrote: > Only the first element of the array is used currently, the other > elements are in preparation for a new muxer calculating multiple > hashes. > > Also move alloc/init code from the write_header() functions to > dedicated init() functions, and the cle

[FFmpeg-devel] [PATCH v2 2/3] avformat/hashenc: use an array of hashes

2019-09-11 Thread Moritz Barsnick
Only the first element of the array is used currently, the other elements are in preparation for a new muxer calculating multiple hashes. Also move alloc/init code from the write_header() functions to dedicated init() functions, and the cleanup code from the write_trailer() functions to dedicated