[FFmpeg-devel] Fw: [PATCH] NUV demuxer doesn't sets keyframe flags

Michael Niedermayer michaelni
Thu May 31 00:45:53 CEST 2007


see: https://sourceforge.net/tracker/index.php?func=detail&aid=1595996&group_id=16082&atid=116082

"NUV demuxer doesn't sets keyframe flags Private: (?) 
No The NUV (NuppelVideo) media format doesn't sets the
keyframes fields from the video frame's headers. Some
problems occured when I had been playing some NUV files
using the FFMPEG plugins to GStreamer, and the
streaming stops on the first keyframe. Here is a very
simple patch:"

Index: libavformat/nuv.c
===================================================================
--- libavformat/nuv.c   (revision 7024)
+++ libavformat/nuv.c   (working copy)
@@ -202,6 +202,9 @@
                 ret = av_new_packet(pkt, HDRSIZE + size);
                 if (ret < 0)
                     return ret;
+               /* sets the keyframe flag; if the hdr[2] is equals to zero, it is a keyframe */
+               if ( hdr[2] == 0 )
+                   pkt->flags |= PKT_FLAG_KEY;
                 pkt->pos = url_ftell(pb);
                 pkt->pts = LE_32(&hdr[4]);
                 pkt->stream_index = ctx->v_id;


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070531/d7c84800/attachment.pgp>



More information about the ffmpeg-devel mailing list