[FFmpeg-cvslog] r17907 - trunk/libavformat/nuv.c

reimar subversion
Mon Mar 9 13:25:14 CET 2009


Author: reimar
Date: Mon Mar  9 13:25:13 2009
New Revision: 17907

Log:
Mark all packets from nuv demuxer as keyframes in order to make seeking work.
For proper seeking, they should be set correctly though.

Modified:
   trunk/libavformat/nuv.c

Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c	Mon Mar  9 13:06:47 2009	(r17906)
+++ trunk/libavformat/nuv.c	Mon Mar  9 13:25:13 2009	(r17907)
@@ -218,6 +218,9 @@ static int nuv_packet(AVFormatContext *s
                 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
                     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;




More information about the ffmpeg-cvslog mailing list