avoid segfault when an encoder could not be opened

closes #473

Change-Id: Ie800c3682be58ab93178bceb9e952f26cb0d0e25
changes/76/19376/1
Richard Fuchs 8 years ago
parent 092f8da3c6
commit 6b88fc9e3a

@ -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