diff --git a/Makefile b/Makefile index 900a351..906c937 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ utils/list.o: utils/list.h effects/action_instant.o: effects/actions.h types.h effects/action_interval.o: effects/actions.h types.h effects/audio.o: effects/actions.h types.h -effects/clips.o: effects/actions.h utils/frame-puller.h types.h +effects/clips.o: effects/clips.c effects/actions.h utils/frame-puller.h types.h cc -c -o effects/clips.o effects/clips.c $(lib_args) effects/drawing.o: effects/drawing.h types.h effects/ease.o: effects/ease.h types.h diff --git a/demo/playplay.c b/demo/playplay.c index 1960641..7d13311 100644 --- a/demo/playplay.c +++ b/demo/playplay.c @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) daku_matter_setsize(m, 150, 150); daku_matter_setanchor(m, 0, 1); daku_matter_setpos(m, 100, 500); - daku_matter_act(m, 0, daku_image_clip(5, "xx.jpg")); + daku_matter_act(m, 0, daku_image_clip(5, "xx.png")); daku_matter_act(m, 0, daku_fx_zoomto(2, 2)); daku_matter_act(m, 1, daku_fx_flip_x()); daku_matter_act(m, 0, daku_fx_freeze()); diff --git a/utils/frame-puller.c b/utils/frame-puller.c index 64e00c9..a9522cc 100644 --- a/utils/frame-puller.c +++ b/utils/frame-puller.c @@ -58,6 +58,8 @@ int _frame_puller_init(frame_puller *fp, enum AVMediaType media_type) } fp->codec_ctx = avcodec_alloc_context3(fp->codec); if ((ret = avcodec_copy_context(fp->codec_ctx, fp->fmt_ctx->streams[i]->codec)) < 0) return ret; + // NOTE: See issue #5 and https://trac.ffmpeg.org/ticket/4404 + fp->codec_ctx->thread_count = fp->fmt_ctx->streams[i]->codec->thread_count = 1; if ((ret = avcodec_open2(fp->codec_ctx, fp->codec, NULL)) < 0) return ret; // Allocate a frame to store the read data fp->orig_frame = av_frame_alloc();