summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-08-17 17:58:53 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-08-17 17:58:53 +0200
commit51bcb910977c7de70eb59add3c8f7bc3cfce8aa2 (patch)
tree9d710f86d5c631accf80ab2f5e84ea0c72305e9b /src
parenta8352d927271b380cb9f9e486b25a504fd61cf0a (diff)
vidcodec: add 'intra' parameter to decoder api
- the intra flag must be set to true, if the decoded video frame is a full intra frame (Key frame) - the video decoder can use this flag to cancel sending of FIR packets
Diffstat (limited to 'src')
-rw-r--r--src/video.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video.c b/src/video.c
index d2587aa..49cc9e4 100644
--- a/src/video.c
+++ b/src/video.c
@@ -515,6 +515,7 @@ static int video_stream_decode(struct vrx *vrx, const struct rtp_header *hdr,
struct vidframe *frame_filt = NULL;
struct vidframe frame_store, *frame = &frame_store;
struct le *le;
+ bool intra;
int err = 0;
if (!hdr || !mbuf_get_left(mb))
@@ -529,7 +530,7 @@ static int video_stream_decode(struct vrx *vrx, const struct rtp_header *hdr,
}
frame->data[0] = NULL;
- err = vrx->vc->dech(vrx->dec, frame, hdr->m, hdr->seq, mb);
+ err = vrx->vc->dech(vrx->dec, frame, &intra, hdr->m, hdr->seq, mb);
if (err) {
if (err != EPROTO) {
@@ -547,6 +548,8 @@ static int video_stream_decode(struct vrx *vrx, const struct rtp_header *hdr,
goto out;
}
+ /* XXX stop pending FIR if intra=true */
+
/* Got a full picture-frame? */
if (!vidframe_isvalid(frame))
goto out;