[FFmpeg-trac] #9012(ffmpeg:new): specified frame type is not compatible with max B-frames

FFmpeg trac at avcodec.org
Fri Nov 27 11:05:47 EET 2020


#9012: specified frame type is not compatible with max B-frames
------------------------------------+----------------------------------
             Reporter:  malaterre   |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  ffmpeg
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+----------------------------------

Comment (by malaterre):

 valgrind reveals:

 {{{
 ==7400== Invalid read of size 4=    4864kB time=00:00:55.65 bitrate=
 715.9kbits/s dup=2 drop=0 speed=0.0468x
 ==7400==    at 0xC9CFEAF: x264_8_macroblock_tree_read (ratecontrol.c:545)
 ==7400==    by 0xC9F82C4: x264_8_encoder_encode (encoder.c:3299)
 ==7400==    by 0xCA884AB: ??? (in /usr/lib/x86_64-linux-
 gnu/libx264.so.155)
 ==7400==    by 0xC977BB0: x264_encoder_encode (api.c:170)
 ==7400==    by 0x5310494: X264_frame (libx264.c:342)
 ==7400==    by 0x50D16B1: avcodec_encode_video2 (encode.c:296)
 ==7400==    by 0x50D1ABC: do_encode (encode.c:365)
 ==7400==    by 0x50D1C51: avcodec_send_frame (encode.c:414)
 ==7400==    by 0x12E9DD: do_video_out (ffmpeg.c:1293)
 ==7400==    by 0x1320D5: reap_filters (ffmpeg.c:1511)
 ==7400==    by 0x136C23: transcode_step (ffmpeg.c:4653)
 ==7400==    by 0x136C23: transcode (ffmpeg.c:4697)
 ==7400==    by 0x1147CD: main (ffmpeg.c:4904)
 ==7400==  Address 0x196efcc8 is 8 bytes after a block of size 278,400
 alloc'd
 ==7400==    at 0x4838123: memalign (in /usr/lib/x86_64-linux-gnu/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==7400==    by 0xC975909: x264_malloc (base.c:124)
 ==7400==    by 0xC9D181F: x264_8_ratecontrol_new (ratecontrol.c:1016)
 ==7400==    by 0xC9F54A5: x264_8_encoder_open (encoder.c:1701)
 ==7400==    by 0xC977AA5: encoder_open (api.c:95)
 ==7400==    by 0xCA884AB: ??? (in /usr/lib/x86_64-linux-
 gnu/libx264.so.155)
 ==7400==    by 0x4EE31C7: X264_init (libx264.c:811)
 ==7400==    by 0x551394F: avcodec_open2 (utils.c:947)
 ==7400==    by 0x130C1A: init_output_stream.constprop.19 (ffmpeg.c:3526)
 ==7400==    by 0x132B40: reap_filters (ffmpeg.c:1447)
 ==7400==    by 0x136C23: transcode_step (ffmpeg.c:4653)
 ==7400==    by 0x136C23: transcode (ffmpeg.c:4697)
 ==7400==    by 0x1147CD: main (ffmpeg.c:4904)
 ==7400==
 [libx264 @ 0x17ac8100] 2nd pass has more frames than 1st pass (1392)
 [libx264 @ 0x17ac8100] continuing anyway, at constant QP=12
 [libx264 @ 0x17ac8100] disabling adaptive B-frames
 [libx264 @ 0x17ac8100] specified frame type is not compatible with max
 B-frames
 ==7400== Invalid read of size 2    4864kB time=00:00:55.65 bitrate=
 715.9kbits/s dup=2 drop=0 speed=0.0466x
 ==7400==    at 0xC9A54F7: weight_cost_init_luma.isra.11 (slicetype.c:82)
 ==7400==    by 0xC9C0C33: x264_8_weights_analyse (slicetype.c:362)
 ==7400==    by 0xC9C3F91: x264_8_slicetype_decide (slicetype.c:1935)
 ==7400==    by 0xC9FB1A5: x264_8_lookahead_get_frames (lookahead.c:238)
 ==7400==    by 0xC9F7957: x264_8_encoder_encode (encoder.c:3333)
 ==7400==    by 0xCA884AB: ??? (in /usr/lib/x86_64-linux-
 gnu/libx264.so.155)
 ==7400==    by 0xC977BB0: x264_encoder_encode (api.c:170)
 ==7400==    by 0x5310558: X264_frame (libx264.c:342)
 ==7400==    by 0x50D16B1: avcodec_encode_video2 (encode.c:296)
 ==7400==    by 0x50D1ABC: do_encode (encode.c:365)
 ==7400==    by 0x50D1C51: avcodec_send_frame (encode.c:414)
 ==7400==    by 0x136231: flush_encoders (ffmpeg.c:1942)
 ==7400==    by 0x136231: transcode (ffmpeg.c:4717)
 ==7400==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
 ==7400==
 ==7400==
 ==7400== Process terminating with default action of signal 11 (SIGSEGV)
 ==7400==  Access not within mapped region at address 0x0
 ==7400==    at 0xC9A54F7: weight_cost_init_luma.isra.11 (slicetype.c:82)
 ==7400==    by 0xC9C0C33: x264_8_weights_analyse (slicetype.c:362)
 ==7400==    by 0xC9C3F91: x264_8_slicetype_decide (slicetype.c:1935)
 ==7400==    by 0xC9FB1A5: x264_8_lookahead_get_frames (lookahead.c:238)
 ==7400==    by 0xC9F7957: x264_8_encoder_encode (encoder.c:3333)
 ==7400==    by 0xCA884AB: ??? (in /usr/lib/x86_64-linux-
 gnu/libx264.so.155)
 ==7400==    by 0xC977BB0: x264_encoder_encode (api.c:170)
 ==7400==    by 0x5310558: X264_frame (libx264.c:342)
 ==7400==    by 0x50D16B1: avcodec_encode_video2 (encode.c:296)
 ==7400==    by 0x50D1ABC: do_encode (encode.c:365)
 ==7400==    by 0x50D1C51: avcodec_send_frame (encode.c:414)
 ==7400==    by 0x136231: flush_encoders (ffmpeg.c:1942)
 ==7400==    by 0x136231: transcode (ffmpeg.c:4717)
 ==7400==  If you believe this happened as a result of a stack
 ==7400==  overflow in your program's main thread (unlikely but
 ==7400==  possible), you can try to increase the size of the
 ==7400==  main thread stack using the --main-stacksize= flag.
 ==7400==  The main thread stack size used in this run was 8388608.
 ==7400==
 ==7400== HEAP SUMMARY:
 ==7400==     in use at exit: 36,818,577 bytes in 2,882 blocks
 ==7400==   total heap usage: 301,652 allocs, 298,770 frees, 5,216,912,469
 bytes allocated
 ==7400==
 ==7400== LEAK SUMMARY:
 ==7400==    definitely lost: 0 bytes in 0 blocks
 ==7400==    indirectly lost: 0 bytes in 0 blocks
 ==7400==      possibly lost: 860,451 bytes in 132 blocks
 ==7400==    still reachable: 35,958,126 bytes in 2,750 blocks
 ==7400==                       of which reachable via heuristic:
 ==7400==                         newarray           : 1,536 bytes in 16
 blocks
 ==7400==         suppressed: 0 bytes in 0 blocks
 ==7400== Rerun with --leak-check=full to see details of leaked memory
 ==7400==
 ==7400== For counts of detected and suppressed errors, rerun with: -v
 ==7400== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9012#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list