On Tue, May 3, 2011 at 12:45 PM, Justin Ruggles <[email protected]> wrote: > On 05/03/2011 03:05 PM, Aℓex Converse wrote: > >> On Tue, May 3, 2011 at 11:45 AM, Justin Ruggles >> <[email protected]> wrote: >>> On 05/03/2011 02:21 PM, Alex Converse wrote: >>> >>>> memset(compressor_name,0,32); >>>> /* FIXME not sure, ISO 14496-1 draft where it shall be set to 0 */ >>>> if (track->mode == MODE_MOV && track->enc->codec && >>>> track->enc->codec->name) >>>> - strncpy(compressor_name,track->enc->codec->name,31); >>>> + av_strlcpy(compressor_name,track->enc->codec->name,32); >>> >>> >>> Can't that memset be replaced with compressor_name[0] = '\0' now that >>> the result will be null-terminated? >>> >> >> avio_w8(pb, strlen(compressor_name)); >> avio_write(pb, compressor_name, 31); >> >> avio_write() is a mem-function not a str-function so we still want it >> zerofilled to the end. Still I can't help but notice that this looks >> like a pascal string and wonder if >> >> avio_w8(pb, strlen(compressor_name)); >> avio_write(pb, compressor_name, strlen(compressor_name)); >> >> would be better. > > ah, I didn't notice that. probably is better that way from the look of > it, but I don't know what the MOV spec says. > >> On Tue, May 3, 2011 at 11:46 AM, Justin Ruggles >> <[email protected]> wrote: >>> On 05/03/2011 02:21 PM, Alex Converse wrote: >>> >>>> @@ -1099,4 +1100,3 @@ void pp_postprocess(const uint8_t * src[3], const >>>> int srcStride[3], >>>> } >>>> } >>>> } >>>> - >>> >>> >>> stray cosmetic change >>> >> >> Fixed > > > patch ok. >
Queued _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
