summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-04-21 08:07:07 -0600
committerJohn Stebbins <[email protected]>2016-04-21 08:07:07 -0600
commit273444ac2bf202a1c6b275b07b5a65532d2e2102 (patch)
tree27871539ef1277e315e78b7956483ed4ed425bd5 /libhb/decavcodec.c
parent8955465161ea109dee0766539396e4b7b1ef0983 (diff)
decavcodec: fix audio decoder frame count
it was always 0
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index f698dde10..874b77e1c 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -2209,6 +2209,10 @@ static void decodeAudio(hb_audio_t *audio, hb_work_private_t *pv, uint8_t *data,
avp.dts = AV_NOPTS_VALUE;
int len = avcodec_decode_audio4(context, pv->frame, &got_frame, &avp);
+ if (len < 0)
+ {
+ ++pv->decode_errors;
+ }
if ((len < 0) || (!got_frame && !(loop_limit--)))
{
return;
@@ -2292,6 +2296,7 @@ static void decodeAudio(hb_audio_t *audio, hb_work_private_t *pv, uint8_t *data,
pv->pts_next = duration + pv->pts_next;
hb_buffer_list_append(&pv->list, out);
}
+ ++pv->nframes;
}
}
}