[gegl] ff-save: only rescale audio packet timestamp when we actually have one
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ff-save: only rescale audio packet timestamp when we actually have one
- Date: Sat, 1 Jul 2017 17:20:32 +0000 (UTC)
commit a7fc6b4b3fa9d190c6b0f1223f0792e4452bbd25
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jun 30 20:55:39 2017 +0200
ff-save: only rescale audio packet timestamp when we actually have one
operations/external/ff-save.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
index e506217..f50c182 100644
--- a/operations/external/ff-save.c
+++ b/operations/external/ff-save.c
@@ -510,13 +510,13 @@ write_audio_frame (GeglProperties *o, AVFormatContext * oc, AVStream * st)
av_frame_make_writable (frame);
ret = avcodec_encode_audio2 (c, &pkt, frame, &got_packet);
- av_packet_rescale_ts (&pkt, st->codec->time_base, st->time_base);
if (ret < 0) {
fprintf (stderr, "Error encoding audio frame: %s\n", av_err2str (ret));
}
if (got_packet)
{
+ av_packet_rescale_ts (&pkt, st->codec->time_base, st->time_base);
pkt.stream_index = st->index;
av_interleaved_write_frame (oc, &pkt);
av_packet_unref (&pkt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]