[FFmpeg-trac] #8079(avcodec:new): s5p-mfc: v4l2_m2m segfaults when encoding

FFmpeg trac at avcodec.org
Tue Aug 13 07:22:27 EEST 2019


#8079: s5p-mfc: v4l2_m2m segfaults when encoding
----------------------------------+--------------------------------------
             Reporter:  jasaw     |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avcodec   |                  Version:  git-master
             Keywords:  v4l2_m2m  |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug:
 ffmpeg segfaults when running encode_video example using h264_v4l2m2m
 encoder.

 How to reproduce:
 {{{
 % ./encode_video <output_file> h264_v4l2m2m
 ffmpeg version N-94529-g3a557c5d88 (git-master)
 built on 2018-08-13
 }}}

 Tested on Odroid XU4, kernel 4.14.127-odroidxu4

 I sprinkled extra debug prints everywhere in ffmpeg to trace the program
 path and where it segfaults. Here's the output:
 {{{
 ./encode_video test.mp4 h264_v4l2m2m
 [h264_v4l2m2m @ 0x14993b0] driver 'uvcvideo' on card 'UVC Camera
 (046d:081b)'
 [h264_v4l2m2m @ 0x14993b0] driver 'exynos-gsc' on card 'exynos-gsc
 gscaler'
 [h264_v4l2m2m @ 0x14993b0] driver 'exynos-gsc' on card 'exynos-gsc
 gscaler'
 [h264_v4l2m2m @ 0x14993b0] driver 's5p-mfc' on card 's5p-mfc-enc'
 [h264_v4l2m2m @ 0x14993b0] Using device /dev/video11
 [h264_v4l2m2m @ 0x14993b0] driver 's5p-mfc' on card 's5p-mfc-enc'
 [h264_v4l2m2m @ 0x14993b0] Encoder does not support b-frames yet
 [h264_v4l2m2m @ 0x14993b0] h264 profile not found
 [h264_v4l2m2m @ 0x14993b0] Encoder adjusted: qmin (0), qmax (51)
 Send frame   0
 ffmpeg: avcodec_send_frame called
 ffmpeg: calling codec->send_frame
 v4l2_m2m_enc: v4l2_send_frame called
 v4l2_context: ff_v4l2_context_enqueue_frame called
 calling ff_v4l2_buffer_avframe_to_buf
 v4l2_buffers: ff_v4l2_buffer_avframe_to_buf called, out ptr: 0x149b4a0
 num_planes = 2
 0: v4l2_bufref_to_buf
 0: frame ptr = 0x149ea70
 0: &frame->buf[0] = 0x149eb68
 0: frame->buf[0] = 0x149ec70
 0: frame->buf[0]->size = 156800
 0: frame->buf[0]->data ptr = 0xb654a020
 1: v4l2_bufref_to_buf
 1: frame ptr = 0x149ea70
 1: &frame->buf[1] = 0x149eb6c
 1: frame->buf[1] = (nil)
 Segmentation fault
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8079>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list