summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-06-19 14:54:24 -0700
committerJohn Stebbins <[email protected]>2017-06-19 14:55:21 -0700
commit1ee85956e293ec15bcd1a97e75aae387124c57db (patch)
treea41d16581d4fe5fbde74b739e3655b60cb44bb07 /libhb
parentb523380c663ae9f5d5a9c17ce0b1d0ef21b06e22 (diff)
decavcodec: fix wmapro audio timestamps
Fixes https://github.com/HandBrake/HandBrake/issues/717
Diffstat (limited to 'libhb')
-rw-r--r--libhb/decavcodec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index cf62002fe..a6f120800 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -1987,6 +1987,13 @@ static void decodeAudio(hb_work_private_t *pv, packet_info_t * packet_info)
AVPacket avp;
int ret;
+ // libav does not supply timestamps for wmapro audio (possibly others)
+ // if there is an input timestamp, initialize next_pts
+ if (pv->next_pts == (int64_t)AV_NOPTS_VALUE &&
+ packet_info->pts != AV_NOPTS_VALUE)
+ {
+ pv->next_pts = packet_info->pts;
+ }
av_init_packet(&avp);
if (packet_info != NULL)
{