]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Mark all packets from nuv demuxer as keyframes in order to make seeking work.
authorreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Mar 2009 12:25:13 +0000 (12:25 +0000)
committerreimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Mon, 9 Mar 2009 12:25:13 +0000 (12:25 +0000)
For proper seeking, they should be set correctly though.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17907 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/nuv.c

index 103223ee83c92aaed36e6eb1130657ed8e8c7a75..cc037f5ac9fe65de080594c700007b0fda8d7d63 100644 (file)
@@ -218,6 +218,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 |= PKT_FLAG_KEY;
                 pkt->pos = pos;
                 pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->v_id;
@@ -231,6 +234,7 @@ static int nuv_packet(AVFormatContext *s, AVPacket *pkt) {
                     break;
                 }
                 ret = av_get_packet(pb, pkt, size);
+                pkt->flags |= PKT_FLAG_KEY;
                 pkt->pos = pos;
                 pkt->pts = AV_RL32(&hdr[4]);
                 pkt->stream_index = ctx->a_id;