[FFmpeg-devel] [PATCH v3 0/3] avformat/hashenc: add streamhash muxer

Gyan ffmpeg at gyani.pro
Sat Sep 21 07:37:25 EEST 2019



On 21-09-2019 03:01 AM, Michael Niedermayer wrote:
> On Wed, Sep 18, 2019 at 04:02:55PM -0300, James Almer wrote:
>> On 9/18/2019 10:47 AM, Moritz Barsnick wrote:
>>> On Thu, Sep 12, 2019 at 11:23:03 +0200, Moritz Barsnick wrote:
>>>> Moritz Barsnick (3):
>>>>    avformat/hashenc: rearrange options definition
>>>>    avformat/hashenc: use an array of hashes
>>>>    avformat/hashenc: add streamhash muxer
>>> Friendly ping for the patch set.
>>>
>>> Moritz
>> I tested it and seems to work as intended, so LGTM.
> applied
Coverity reports three issues arising from this patchset, actually one 
issue, having an instance in each of the three init () functions.

CID 1453867, 1453866 & 1453865

Code maintainability issues  (SIZEOF_MISMATCH)

For

     c->hashes = av_mallocz_array(1, sizeof(c->hashes));


it says,

"Passing argument "8UL /* sizeof (c->hashes) */" to function 
"av_mallocz_array" and then casting the return value to "struct 
AVHashContext **" is suspicious. In this particular case "sizeof (struct 
AVHashContext **)" happens to be equal to "sizeof (struct AVHashContext 
*)", but this is not a portable assumption."

Gyan



More information about the ffmpeg-devel mailing list