summaryrefslogtreecommitdiffstats
path: root/libhb/encx265.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/encx265.c')
-rw-r--r--libhb/encx265.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libhb/encx265.c b/libhb/encx265.c
index eaf131d0b..9cb23bd08 100644
--- a/libhb/encx265.c
+++ b/libhb/encx265.c
@@ -384,8 +384,9 @@ static hb_buffer_t* nal_encode(hb_work_object_t *w,
{
return NULL;
}
-
+ buf->s.flags = 0;
buf->size = 0;
+
// copy the bitstream data
for (i = 0; i < nnal; i++)
{
@@ -406,11 +407,10 @@ static hb_buffer_t* nal_encode(hb_work_object_t *w,
switch (pic_out->sliceType)
{
case X265_TYPE_IDR:
+ buf->s.flags |= HB_FLAG_FRAMETYPE_REF;
+ buf->s.flags |= HB_FLAG_FRAMETYPE_KEY;
buf->s.frametype = HB_FRAME_IDR;
break;
- case X265_TYPE_I:
- buf->s.frametype = HB_FRAME_I;
- break;
case X265_TYPE_P:
buf->s.frametype = HB_FRAME_P;
break;
@@ -420,12 +420,13 @@ static hb_buffer_t* nal_encode(hb_work_object_t *w,
case X265_TYPE_BREF:
buf->s.frametype = HB_FRAME_BREF;
break;
+ case X265_TYPE_I:
default:
- buf->s.frametype = 0;
+ buf->s.frametype = HB_FRAME_I;
break;
}
- if (pic_out->sliceType == X265_TYPE_IDR)
+ if (buf->s.flags & HB_FLAG_FRAMETYPE_KEY)
{
hb_chapter_dequeue(pv->chapter_queue, buf);
}