[FFmpeg-devel] [PATCH] EBU Tech 3285 – Supplement 3 - Peak Envelope Chunk encoder

Georg Lippitsch georg.lippitsch at gmx.at
Wed May 28 21:11:47 CEST 2014


Am 28.05.2014, 13:04 Uhr, schrieb Michael Niedermayer <michaelni at gmx.at>:

>> +    now0 = av_gettime();
>> +    now_secs = now0 / 1000000;
>> +    strftime(timestamp, 28, "%Y:%m:%d:%H:%M:%S:",  
>> localtime(&now_secs));
>> +    av_strlcatf(timestamp, 28, "%03d", (int)((now0 / 1000) % 1000));
>
> this cant be done when AVFMT_FLAG_BITEXACT is set.
> Also what purpose does it serve to store the muxing time ?
> This poses a security issue as it leaks information about the time
> as well as the environment
> I was not able to find any hint in the specification about the use
> of this field

The spec says: "A C string containing the time stamp of the creation of  
the peak data", which from my understanding is the same as the muxing time.
Since this code will mainly be used to create files for archival purpose,  
storing the muxing time will certainly be useful to keep track of when was  
something created. Indeed, for BITEXACT mode this is improper, so I could  
write some fake timestamp in that case.
For your security concerns, I don't have any proper solution except  
violating the specs. What would you suggest?

>> +                wav->peak_maxpos[c] = FFMAX(wav->peak_maxpos[c],  
>> *(int16_t*)(pkt->data + i));
>> +                wav->peak_maxneg[c] = FFMIN(wav->peak_maxneg[c],  
>> *(int16_t*)(pkt->data + i));
>
> AV_RL16()

AV_RL16 casts to uint16_t*, are you sure this will work?


The other remarks are ok, I will send a new patch as soon as these two  
points are resolved.


Thanks!

Georg


More information about the ffmpeg-devel mailing list