[FFmpeg-devel] [PATCH 4/5] lavc: add frame multithreading capability (currently intra only)

Michael Niedermayer michaelni at gmx.at
Sat Jun 23 00:18:50 CEST 2012


On Thu, Jun 14, 2012 at 09:41:58PM +0000, Paul B Mahol wrote:
[...]
> > +static void * attribute_align_arg worker(void *v){
> > +    AVCodecContext *avctx = v;
> > +    ThreadContext *c = avctx->internal->frame_thread_encoder;
> > +    AVPacket *pkt = NULL;
> > +
> > +    while(!c->exit){
> > +        int got_packet, ret;
> > +        AVFrame *frame;
> > +        Task task;
> > +
> > +        if(!pkt) pkt= av_mallocz(sizeof(*pkt));
> 
> Please check return value (while also preventing memory leaks).

fixed all


[...]
> > +        memcpy(thread_avctx->priv_data, avctx->priv_data, avctx->codec->priv_data_size);
> > +        thread_avctx->thread_count = 1;
> > +        thread_avctx->active_thread_type &= ~FF_THREAD_FRAME;
> > +
> > +        //FIXME pass private options to encoder
> IMHO this should be implemented.

yes but we first need an encoder that uses it so its tested,
mjpeg doesnt ...


[...]
> > +}
> > \ No newline at end of file

fixed

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120623/c8452fec/attachment.asc>


More information about the ffmpeg-devel mailing list