Message ID | 20200119155245.3297-1-lance.lmwang@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v1] avcodec/libx264: return immediately if encode_nals return 0 | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 77bf887..3dc15a4 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -437,6 +437,9 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, return ret; } while (!ret && !frame && x264_encoder_delayed_frames(x4->enc)); + if (!ret) + return 0; + pkt->pts = pic_out.i_pts; pkt->dts = pic_out.i_dts;