[FFmpeg-devel] [PATCH ffmpeg] Try to fix kdenlive crash

Mikko Rapeli mikko.rapeli at iki.fi
Wed Sep 28 21:42:01 CEST 2011


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x557feb70 (LWP 21733)]
0xb052d0fd in avcodec_decode_video2 (avctx=0x172c3e40, picture=0x174217a0,
    got_picture_ptr=0x557fddec, avpkt=0x557fdd44) at libavcodec/utils.c:762
762         if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
(gdb) bt full
    got_picture_ptr=0x557fddec, avpkt=0x557fdd44) at libavcodec/utils.c:762
        ret = <optimized out>
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at producer_avformat.c:1486
        ret = 0
        int_position = 0
        decode_errors = 0
        got_picture = 0
        self = 0x574cc918
        producer = 0x5afe8a48
        frame_properties = 0x9de0540
        position = 0
        properties = 0x5afe8a48
        context = 0x16f25a00
        stream = 0x16544160
        codec_context = 0x172c3e40
        image_size = 0
        pkt = {pts = 126000, dts = 124200, data = 0x183d9b10 "", size = 10962,
          stream_index = 0, flags = 1, side_data = 0x0, side_data_elems = 0,
          duration = 1800, destruct = 0, priv = 0x557fde78, pos = 564,
          convergence_duration = 0}
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) bt full
    got_picture_ptr=0x557fddec, avpkt=0x557fdd44) at libavcodec/utils.c:762
        ret = <optimized out>
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at producer_avformat.c:1486
        ret = 0
        int_position = 0
        decode_errors = 0
        got_picture = 0
        self = 0x574cc918
        producer = 0x5afe8a48
        frame_properties = 0x9de0540
        position = 0
        properties = 0x5afe8a48
        context = 0x16f25a00
        stream = 0x16544160
        codec_context = 0x172c3e40
        image_size = 0
        pkt = {pts = 126000, dts = 124200, data = 0x183d9b10 "", size = 10962,
          stream_index = 0, flags = 1, side_data = 0x0, side_data_elems = 0,
          duration = 1800, destruct = 0, priv = 0x557fde78, pos = 564,
          convergence_duration = 0}
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) print avctx
$1 = (AVCodecContext *) 0x172c3e40
(gdb) print avctx->codec
$2 = (struct AVCodec *) 0x0
(gdb) bt full
    got_picture_ptr=0x557fddec, avpkt=0x557fdd44) at libavcodec/utils.c:762
        ret = <optimized out>
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at producer_avformat.c:1486
        ret = 0
        int_position = 0
        decode_errors = 0
        got_picture = 0
        self = 0x574cc918
        producer = 0x5afe8a48
        frame_properties = 0x9de0540
        position = 0
        properties = 0x5afe8a48
        context = 0x16f25a00
        stream = 0x16544160
        codec_context = 0x172c3e40
        image_size = 0
        pkt = {pts = 126000, dts = 124200, data = 0x183d9b10 "", size = 10962,
          stream_index = 0, flags = 1, side_data = 0x0, side_data_elems = 0,
          duration = 1800, destruct = 0, priv = 0x557fde78, pos = 564,
          convergence_duration = 0}
---Type <return> to continue, or q <return> to quit---
        ignore = <optimized out>
        source_fps = 50
        req_position = 0
        must_decode = 1
        use_new_seek = 0
        paused = -1
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at mlt_frame.c:453
        properties = 0x9de0540
        get_image = 0xb0e18120 <producer_get_image>
        producer = <optimized out>
        requested_format = mlt_image_yuv422
        error = 0
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at filter_crop.c:76
        error = 0
        properties = 0x9de0540
        left = 0
        right = 0
        top = 0
        bottom = 0
---Type <return> to continue, or q <return> to quit---
        owidth = <optimized out>
        oheight = <optimized out>
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at mlt_frame.c:453
        properties = 0x9de0540
        get_image = 0xad8f22a0 <filter_get_image>
        producer = <optimized out>
        requested_format = mlt_image_yuv422
        error = 0
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at filter_deinterlace.c:239
        service = <optimized out>
        method_str = <optimized out>
        method = <optimized out>
        frame_method_str = <optimized out>
        error = <optimized out>
        properties = 0x9de0540
        deinterlace = 1
        progressive = <optimized out>
        filter = 0x6b866958
---Type <return> to continue, or q <return> to quit---
    format=0x557fe310, width=0x557fe0c4, height=0x557fe0c8, writable=0)
    at mlt_frame.c:453
        properties = 0x9de0540
        get_image = 0xb1363ea0 <filter_get_image>
        producer = <optimized out>
        requested_format = mlt_image_rgb24a
        error = 0
    format=0x557fe310, width=0x557fe1d0, height=0x557fe1d4, writable=0)
    at filter_rescale.c:215
        interps = <optimized out>
        iwidth = 480
        iheight = 270
        factor = 1
        oheight = 720
        error = 0
        properties = 0x9de0540
        filter = 0x55cd51d8
        filter_properties = 0x55cd51d8
        scaler_method = 0xb0e13cb0 <filter_scale>
    format=0x557fe310, width=0x557fe1d0, height=0x557fe1d4, writable=0)
    at mlt_frame.c:453
---Type <return> to continue, or q <return> to quit---
        properties = 0x9de0540
        get_image = 0xad8f7ea0 <filter_get_image>
        producer = <optimized out>
        requested_format = mlt_image_rgb24a
        error = 0
    format=0x557fe310, width=0x557fe314, height=0x557fe318, writable=0)
    at filter_resize.c:267
        error = 0
        properties = 0x9de0540
        filter = 0x573ffed0
        aspect_ratio = 1.0000000000001599
        consumer_aspect = 1
        owidth = 1280
        oheight = 720
        rescale = <optimized out>
    format=0x557fe310, width=0x557fe314, height=0x557fe318, writable=0)
    at mlt_frame.c:453
        properties = 0x9de0540
        get_image = 0xad8f8600 <filter_get_image>
        producer = <optimized out>
        requested_format = mlt_image_rgb24a
---Type <return> to continue, or q <return> to quit---
        error = 0
    at consumer_sdl_still.c:477
        height = 720
        width = 1280
        unlock = 0
        properties = 0x901d6b0
        lock = <optimized out>
        screen = <optimized out>
        vfmt = mlt_image_yuv422
        image = 0x0
        changed = <optimized out>
        display_ratio = 1.7777777777777777
        this = 0x901d6b0
        consumer = 0x901d6b0
        properties = 0x901d6b0
        frame = 0x9de0540
        preview_off = 0
        __res = <optimized out>
        __ignore1 = <optimized out>
        __ignore2 = <optimized out>
---Type <return> to continue, or q <return> to quit---
        pd = 0x557feb70
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {-1220292620, 0, 4001536,
                1434444856, 837272823, 1270445875}, mask_was_saved = 0}},
          priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0,
              cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
No locals.
Backtrace stopped: Not enough registers or memory available to unwind further
---
 libavcodec/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 4ad902b..c738d29 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -759,7 +759,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
     if((avctx->coded_width||avctx->coded_height) && av_image_check_size(avctx->coded_width, avctx->coded_height, 0, avctx))
         return -1;
 
-    if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
+    if(avctx->codec && ((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME))){
         av_packet_split_side_data(avpkt);
         avctx->pkt = avpkt;
         if (HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list