summaryrefslogtreecommitdiff
path: root/libavformat/nuv.c
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2011-09-11 17:59:32 +0200
committerJoakim Plate <elupus@ecce.se>2011-09-18 18:25:44 +0200
commit8e4c10003acc5c909e3f8a463995ffd428a41a58 (patch)
tree7fa8e8e9347c18bebbfb337a26699318f299a42e /libavformat/nuv.c
parent7768f6b1b91b0046e51d02c70b31a1c7766bd4d7 (diff)
downloadffmpeg-8e4c10003acc5c909e3f8a463995ffd428a41a58.tar.gz
Set AV_PKT_FLAG_KEY based on nupplevideo header
Based from lipbmpdemux/nupplevideo.h and from myth NuppelVideoRecorder.cpp
Diffstat (limited to 'libavformat/nuv.c')
-rw-r--r--libavformat/nuv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 20ca472673..2444a508c8 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -219,10 +219,9 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
ret = av_new_packet(pkt, copyhdrsize + size);
if (ret < 0)
return ret;
- // HACK: we have no idea if it is a keyframe,
- // but if we mark none seeking will not work at all.
- pkt->flags |= AV_PKT_FLAG_KEY;
+
pkt->pos = pos;
+ pkt->flags |= hdr[2] == 0 ? AV_PKT_FLAG_KEY : 0;
pkt->pts = AV_RL32(&hdr[4]);
pkt->stream_index = ctx->v_id;
memcpy(pkt->data, hdr, copyhdrsize);