On Thu, 16 Aug 2018 at 21:19, Rostislav Pehlivanov <atomnu...@gmail.com>
wrote:

>
>
> On Thu, 16 Aug 2018 at 18:40, Paul B Mahol <one...@gmail.com> wrote:
>
>> On 8/16/18, Paul B Mahol <one...@gmail.com> wrote:
>> > Hi,
>> >
>> > another patch attached, please review.
>> >
>>
>> Again.
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
> > + s->prev_frame = av_frame_alloc();
> > + if (!s->prev_frame)
> > +     return AVERROR(ENOMEM);
>
> No need to allocate anything. A reference to a frame is a pointer.
>
>
> > + av_frame_free(&s->prev_frame);
> Replace with av_frame_unref(s->prev_frame);
>
>
> Otherwise looks fine.
>

Also the decoder doesn't handle seeking correctly. You need an
AVCodec->flush() function to unref s->prev_frame and a parser too to
determine keyframes.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to