[gegl/video-rejuvenation: 13/83] ff-load: improve audio_sample_pos computation
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/video-rejuvenation: 13/83] ff-load: improve audio_sample_pos computation
- Date: Thu, 19 Nov 2015 21:43:25 +0000 (UTC)
commit 5e004c2746710b6b6f34de613e9aca616fad1bab
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Oct 8 15:01:53 2015 +0200
ff-load: improve audio_sample_pos computation
operations/external/ff-load.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 34876bd..1aa803f 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -392,8 +392,6 @@ prepare (GeglOperation *operation)
return;
}
-
-
p->width = p->video_context->width;
p->height = p->video_context->height;
p->lavc_frame = av_frame_alloc ();
@@ -402,6 +400,7 @@ prepare (GeglOperation *operation)
g_free (p->fourcc);
p->fourcc = g_strdup ("none");
p->fourcc[0] = (p->video_context->codec_tag) & 0xff;
+
p->fourcc[1] = (p->video_context->codec_tag >> 8) & 0xff;
p->fourcc[2] = (p->video_context->codec_tag >> 16) & 0xff;
p->fourcc[3] = (p->video_context->codec_tag >> 24) & 0xff;
@@ -458,7 +457,10 @@ samples_per_frame (int frame,
int f = 0;
if (sample_rate % ((int)frame_rate) == 0)
+ {
+ *start = (sample_rate / frame_rate) * frame;
return sample_rate / frame_rate;
+ }
for (f = 0; f < frame; f++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]