Optimise usage of videodev2.h
header
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "http/http.h"
|
||||
#include "device/hw/v4l2.h"
|
||||
#include "opts/log.h"
|
||||
|
||||
#define BUFSIZE 256
|
||||
|
||||
|
@ -52,7 +52,7 @@ bool h264_is_key_frame(buffer_t *buf)
|
||||
{
|
||||
unsigned char *data = buf->start;
|
||||
|
||||
if (buf->v4l2.flags & V4L2_BUF_FLAG_KEYFRAME) {
|
||||
if (buf->flags.is_keyframe) {
|
||||
E_LOG_DEBUG(buf, "Got key frame (from V4L2)!");
|
||||
return true;
|
||||
} else if (buf->used >= 5 && (data[4] & 0x1F) == 0x07) {
|
||||
|
Reference in New Issue
Block a user