Zane van Iperen: > > > On 3/11/20 10:44 am, Andreas Rheinhardt wrote: >>> +static void amv_write_vlist(AVFormatContext *s, AVCodecParameters *par) >>> +{ >>> + uint8_t buf[FFMAX(AMV_VIDEO_STRH_SIZE, AMV_VIDEO_STRF_SIZE)] = { 0 }; >>> + int64_t tag_list, tag_str; >>> + >>> + av_assert0(par->codec_id == AV_CODEC_ID_AMV); >>> + >>> + tag_list = amv_start_tag(s->pb, "LIST"); >>> + ffio_wfourcc(s->pb, "strl"); >>> + tag_str = ff_start_tag(s->pb, "strh"); >>> + avio_write(s->pb, buf, AMV_VIDEO_STRH_SIZE); >> >> Use ffio_fill() here and in the two other places where you use write >> zeroes; this also allows to no longer initialize the buf below. >> > > Ah, I was wondering if something like that existed. Didn't consider the > ffio_ prefix. Reckon I should just get rid of all the buffers and change > everything to avio_wlXX? > Using a temporary buffer might be better because it avoids function call overhead.
- Andreas _______________________________________________ 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".