Skip to content
Snippets Groups Projects
Commit d71d64dc authored by Reimar Döffinger's avatar Reimar Döffinger
Browse files

Mark all packets from nuv demuxer as keyframes in order to make seeking work.

For proper seeking, they should be set correctly though.

Originally committed as revision 17907 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 37b7dac1
No related branches found
No related tags found
No related merge requests found
...@@ -218,6 +218,9 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { ...@@ -218,6 +218,9 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
ret = av_new_packet(pkt, copyhdrsize + size); ret = av_new_packet(pkt, copyhdrsize + size);
if (ret < 0) if (ret < 0)
return ret; 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 |= PKT_FLAG_KEY;
pkt->pos = pos; pkt->pos = pos;
pkt->pts = AV_RL32(&hdr[4]); pkt->pts = AV_RL32(&hdr[4]);
pkt->stream_index = ctx->v_id; pkt->stream_index = ctx->v_id;
...@@ -231,6 +234,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) { ...@@ -231,6 +234,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
break; break;
} }
ret = av_get_packet(pb, pkt, size); ret = av_get_packet(pb, pkt, size);
pkt->flags |= PKT_FLAG_KEY;
pkt->pos = pos; pkt->pos = pos;
pkt->pts = AV_RL32(&hdr[4]); pkt->pts = AV_RL32(&hdr[4]);
pkt->stream_index = ctx->a_id; pkt->stream_index = ctx->a_id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment