[gegl/video-rejuvenation] ff-load/ff-save: unref when destroying audio track caches
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/video-rejuvenation] ff-load/ff-save: unref when destroying audio track caches
- Date: Fri, 20 Nov 2015 23:23:14 +0000 (UTC)
commit d9f35abf6a24be48b5c1309301a38cb16c5ac134
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Nov 20 21:57:04 2015 +0100
ff-load/ff-save: unref when destroying audio track caches
operations/external/ff-load.c | 10 +++++-----
operations/external/ff-save.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index f5c3f39..44d184c 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -112,7 +112,7 @@ clear_audio_track (GeglProperties *o)
Priv *p = (Priv*)o->user_data;
while (p->audio_track)
{
- g_free (p->audio_track->data);
+ g_object_unref (p->audio_track->data);
p->audio_track = g_list_remove (p->audio_track, p->audio_track->data);
}
}
@@ -271,7 +271,7 @@ decode_audio (GeglOperation *operation,
default:
g_warning ("undealt with sample format\n");
}
- af->xsample_count = sample_count;
+ gegl_audio_fragment_set_sample_count (af, sample_count);
af->pos = p->audio_pos;
p->audio_pos += af->xsample_count;
p->audio_track = g_list_append (p->audio_track, af);
@@ -630,10 +630,10 @@ process (GeglOperation *operation,
o->audio->xchannels = 2;
o->audio->xchannel_layout = AV_CH_LAYOUT_STEREO;
- /* XXX: should compare against max and fix if going over */
- o->audio->xsample_count = samples_per_frame (o->frame,
+ gegl_audio_fragment_set_sample_count (o->audio,
+ samples_per_frame (o->frame,
o->frame_rate, o->audio->sample_rate,
- &sample_start);
+ &sample_start));
decode_audio (operation, p->prevpts, p->prevpts + 5.0);
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
index c7c7b14..32f7030 100644
--- a/operations/external/ff-save.c
+++ b/operations/external/ff-save.c
@@ -110,7 +110,7 @@ clear_audio_track (GeglProperties *o)
Priv *p = (Priv*)o->user_data;
while (p->audio_track)
{
- g_free (p->audio_track->data);
+ g_object_unref (p->audio_track->data);
p->audio_track = g_list_remove (p->audio_track, p->audio_track->data);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]