History

avfilter/framesync: allocate FFFrameSyncIn internally

Paul B Mahol committed 13 years ago

Commit 0190c371 parent a16251a5 files · +22 −10Browse files

Showing the changes to libavfilter/framesync.c (1 of 5 files). Show all

Unified · Split

libavfilter/framesync.c+8−1
@@ -46,11 +46,16 @@ enum { · 45 unmodified lines
46 STATE_EOF,46 STATE_EOF,
47};47};
48 48
49void ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in)49int ff_framesync_init(FFFrameSync *fs, void *parent, unsigned nb_in)
50{50{
51 fs->class = &framesync_class;51 fs->class = &framesync_class;
52 fs->parent = parent;52 fs->parent = parent;
53 fs->nb_in = nb_in;53 fs->nb_in = nb_in;
54
55 fs->in = av_calloc(nb_in, sizeof(*fs->in));
56 if (!fs->in)
57 return AVERROR(ENOMEM);
58 return 0;
54}59}
55 60
56static void framesync_sync_level_update(FFFrameSync *fs)61static void framesync_sync_level_update(FFFrameSync *fs)
@@ -267,6 +272,8 @@ void ff_framesync_uninit(FFFrameSync *fs) · 210 unmodified lines
267 av_frame_free(&fs->in[i].frame_next);272 av_frame_free(&fs->in[i].frame_next);
268 ff_bufqueue_discard_all(&fs->in[i].queue);273 ff_bufqueue_discard_all(&fs->in[i].queue);
269 }274 }
275
276 av_freep(&fs->in);
270}277}
271 278
272int ff_framesync_process_frame(FFFrameSync *fs, unsigned all)279int ff_framesync_process_frame(FFFrameSync *fs, unsigned all)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t