Skip to content

Commit

Permalink
Fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pisces000221 committed Aug 8, 2015
1 parent 180ffa1 commit d6ea88d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion demo/playplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 2 additions & 0 deletions utils/frame-puller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d6ea88d

Please sign in to comment.