ff-load: make video-less decoding also work for mp3 files

Though for both ogg vorbis and mp3 that have been tested, the duration is off
and decoding stops after a the first handfuls of seconds.
parent 75131a99
......@@ -325,6 +325,9 @@ decode_frame (GeglOperation *operation,
}
decodeframe = frame;
if (p->video_stream)
{
if (frame < 2 || frame > prevframe + 64 || frame < prevframe )
{
int64_t seek_target = av_rescale_q (((frame) * AV_TIME_BASE * 1.0) / o->frame_rate
......@@ -393,6 +396,7 @@ decode_frame (GeglOperation *operation,
while (!got_picture);
}
while (decodeframe <= frame + p->codec_delay);
}
p->prevframe = frame;
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment