Browse Source

avoid segfault when an encoder could not be opened

closes #473

Change-Id: Ie800c3682be58ab93178bceb9e952f26cb0d0e25
changes/76/19376/1
Richard Fuchs 8 years ago
parent
commit
6b88fc9e3a
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      lib/codeclib.c

+ 3
- 0
lib/codeclib.c View File

@ -1006,6 +1006,9 @@ static int avc_encoder_input(encoder_t *enc, AVFrame **frame) {
int keep_going = 0;
int got_packet = 0;
if (!enc->u.avc.avcctx)
return -1;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 36, 0)
if (*frame) {
int ret = avcodec_send_frame(enc->u.avc.avcctx, *frame);


Loading…
Cancel
Save