mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Set AV_PKT_FLAG_KEY based on nupplevideo header
Based from lipbmpdemux/nupplevideo.h and from myth NuppelVideoRecorder.cpp
This commit is contained in:
parent
7768f6b1b9
commit
8e4c10003a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user