[FFmpeg-devel] [PATCH] avcodec: add IMM4 decoder

Rostislav Pehlivanov atomnuker at gmail.com
Thu Aug 16 23:22:25 EEST 2018


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

>
>
> On Thu, 16 Aug 2018 at 18:40, Paul B Mahol <onemda at gmail.com> wrote:
>
>> On 8/16/18, Paul B Mahol <onemda at gmail.com> wrote:
>> > Hi,
>> >
>> > another patch attached, please review.
>> >
>>
>> Again.
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at 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.


More information about the ffmpeg-devel mailing list