[Freeswitch-users] H264 Encoding Error

郭秋平 guoqiuping81112 at 163.com
Tue Mar 1 12:11:43 MSK 2016


Hi All:

My box is CentOS6.5, and FS is 1.6.4

When I use H264 as the video codec.
FS report encoding fail as below.
     [ERR] avcodec.c:1117 Encoding Error -1
and x264 report
     lookahead thread is already stopped

I checked the source code, I found that
when switch_h264_encode encode is invoked first time, it results that context->got_encoded_output is set to 1.
and after that, if switch_h264_encode is invoked again, it will check context->got_encoded_output , and then pass null frame to avcodec_encode_video2 which will stop the lookahead thread because of the null frame.
switch_h264_encode:
	if (*got_output) { // Could be more delayed frames
		ret = avcodec_encode_video2(avctx, pkt, NULL, got_output);

Is it a bug of mod_av or how can i solve the problem?

Thanks a lot








-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160301/8109872c/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list