On Tue, Jul 16, 2019 at 11:57:36AM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol <one...@gmail.com> > --- > configure | 1 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/avcodec.h | 1 + > libavcodec/codec_desc.c | 7 ++ > libavcodec/imm5.c | 175 ++++++++++++++++++++++++++++++++++++++++ > libavformat/riff.c | 1 + > 7 files changed, 187 insertions(+) > create mode 100644 libavcodec/imm5.c > > diff --git a/configure b/configure
> + > + if (index >= 1 && index <= 12) { > + index -= 1; > + off = offset = IMM5_units[index].len; > + if (codec_type == 2) { > + offset += IMM5_units[12].len; > + } else { > + offset += IMM5_units[13].len; > + } > + > + buf += 24 - offset; > + buf_size = new_size + offset; > + > + memcpy(buf, IMM5_units[index].bits, IMM5_units[index].len); > + if (codec_type == 2) { > + memcpy(buf + off, IMM5_units[12].bits, IMM5_units[12].len); > + } else { > + memcpy(buf + off, IMM5_units[13].bits, IMM5_units[13].len); > + } this all looks pretty good. without trying to nitpick it forever, i suggest replacing the (codec_type==2) blocks. index2 = codec_type2 == 2 ? 12 : 13; offset += IMM5_units[index2].len; ... memcpy(buf + off, IMM5_units[index2].bits, IMM5_units[index2].len); -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
signature.asc
Description: PGP signature
_______________________________________________ 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".