lavd/kmsgrab: Fix packet flag setting
authorMark Thompson <sw@jkqxz.net>
Thu, 14 Sep 2017 08:14:36 +0000 (09:14 +0100)
committerMark Thompson <sw@jkqxz.net>
Thu, 14 Sep 2017 08:14:36 +0000 (09:14 +0100)
Found-by: James Almer <jamrial@gmail.com>
libavdevice/kmsgrab.c

index d0b9cf5..d222abf 100644 (file)
@@ -190,10 +190,10 @@ static int kmsgrab_read_packet(AVFormatContext *avctx, AVPacket *pkt)
     if (!pkt->buf)
         return AVERROR(ENOMEM);
 
-    pkt->data  = (uint8_t*)frame;
-    pkt->size  = sizeof(*frame);
-    pkt->pts   = now;
-    pkt->flags = AV_PKT_FLAG_TRUSTED;
+    pkt->data   = (uint8_t*)frame;
+    pkt->size   = sizeof(*frame);
+    pkt->pts    = now;
+    pkt->flags |= AV_PKT_FLAG_TRUSTED;
 
     return 0;
 }