On 22/10/15 14:29, Vittorio Giovara wrote: > On Sun, Oct 18, 2015 at 11:46 PM, Luca Barbato <[email protected]> wrote: >> --- >> >> Would make sense to support this kind of files? (see Bug 879 to see >> something that >> at least now looks like that) >> >> libavformat/dvenc.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c >> index a33973f..106cba4 100644 >> --- a/libavformat/dvenc.c >> +++ b/libavformat/dvenc.c >> @@ -249,6 +249,11 @@ static int dv_assemble_frame(DVMuxContext *c, AVStream* >> st, >> /* FIXME: we have to have more sensible approach than this one */ >> if (c->has_video) >> av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. >> Insufficient audio data or severe sync problem.\n", c->frames); >> + if (data_size != c->sys->frame_size) { >> + av_log(st->codec, AV_LOG_ERROR, "Unexpected frame size, %d != >> %d\n", >> + data_size, c->sys->frame_size); >> + return AVERROR(ENOSYS); >> + } >> >> memcpy(*frame, data, c->sys->frame_size); >> c->has_video = 1; > > maybe < instead of != ? > probably ok anyway >
The framesize must be consistent, less than wouldn't crash but is still a bug. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
