Skip to content
Snippets Groups Projects
Commit 7968b1f8 authored by Hendrik Leppkes's avatar Hendrik Leppkes
Browse files

Merge commit '8edaf625'


* commit '8edaf625':
  libopenh264enc: Count and warn about the number of skipped frames

Merged-by: default avatarHendrik Leppkes <h.leppkes@gmail.com>
parents f79bb118 8edaf625
Branches
Tags
No related merge requests found
...@@ -39,6 +39,7 @@ typedef struct SVCContext { ...@@ -39,6 +39,7 @@ typedef struct SVCContext {
char *profile; char *profile;
int max_nal_size; int max_nal_size;
int skip_frames; int skip_frames;
int skipped;
} SVCContext; } SVCContext;
#define OPENH264_VER_AT_LEAST(maj, min) \ #define OPENH264_VER_AT_LEAST(maj, min) \
...@@ -95,6 +96,8 @@ static av_cold int svc_encode_close(AVCodecContext *avctx) ...@@ -95,6 +96,8 @@ static av_cold int svc_encode_close(AVCodecContext *avctx)
if (s->encoder) if (s->encoder)
WelsDestroySVCEncoder(s->encoder); WelsDestroySVCEncoder(s->encoder);
if (s->skipped > 0)
av_log(avctx, AV_LOG_WARNING, "%d frames skipped\n", s->skipped);
return 0; return 0;
} }
...@@ -252,6 +255,7 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, ...@@ -252,6 +255,7 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
} }
if (fbi.eFrameType == videoFrameTypeSkip) { if (fbi.eFrameType == videoFrameTypeSkip) {
s->skipped++;
av_log(avctx, AV_LOG_DEBUG, "frame skipped\n"); av_log(avctx, AV_LOG_DEBUG, "frame skipped\n");
return 0; return 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment