diff options
author | Joakim Plate <elupus@ecce.se> | 2011-09-11 17:59:32 +0200 |
---|---|---|
committer | Joakim Plate <elupus@ecce.se> | 2011-09-18 18:25:44 +0200 |
commit | 8e4c10003acc5c909e3f8a463995ffd428a41a58 (patch) | |
tree | 7fa8e8e9347c18bebbfb337a26699318f299a42e /libavformat/nuv.c | |
parent | 7768f6b1b91b0046e51d02c70b31a1c7766bd4d7 (diff) | |
download | ffmpeg-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.c | 5 |
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); |