summaryrefslogtreecommitdiff
path: root/libavcodec/libopenh264enc.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:26:17 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-29 14:26:17 +0100
commit7968b1f85339694e05ea9f904d20a7233e652c43 (patch)
tree15da2f606f2721751083113ecaa4b7b3835cc238 /libavcodec/libopenh264enc.c
parentf79bb118f58988059768140e517b67a6fb2c07c7 (diff)
parent8edaf625f3c38c695c33745822182e94e17d6e1b (diff)
Merge commit '8edaf625f3c38c695c33745822182e94e17d6e1b'
* commit '8edaf625f3c38c695c33745822182e94e17d6e1b': libopenh264enc: Count and warn about the number of skipped frames Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r--libavcodec/libopenh264enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 8ff85b5070..ccf65ebf8a 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -39,6 +39,7 @@ typedef struct SVCContext {
char *profile;
int max_nal_size;
int skip_frames;
+ int skipped;
} SVCContext;
#define OPENH264_VER_AT_LEAST(maj, min) \
@@ -95,6 +96,8 @@ static av_cold int svc_encode_close(AVCodecContext *avctx)
if (s->encoder)
WelsDestroySVCEncoder(s->encoder);
+ if (s->skipped > 0)
+ av_log(avctx, AV_LOG_WARNING, "%d frames skipped\n", s->skipped);
return 0;
}
@@ -252,6 +255,7 @@ static int svc_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return AVERROR_UNKNOWN;
}
if (fbi.eFrameType == videoFrameTypeSkip) {
+ s->skipped++;
av_log(avctx, AV_LOG_DEBUG, "frame skipped\n");
return 0;
}