Ticket #5906: ffv1_crash.diff

File ffv1_crash.diff, 1.7 KB (added by thegeek, 3 years ago)
  • doc/examples/muxing.c

    diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
    index f1f5bb8..d29b032 100644
    a b  
    4343#include <libswscale/swscale.h>
    4444#include <libswresample/swresample.h>
    4545
    46 #define STREAM_DURATION   10.0
    47 #define STREAM_FRAME_RATE 25 /* 25 images/s */
     46#define STREAM_DURATION   10000.0
     47#define STREAM_FRAME_RATE 1000 /* 25 images/s */
    4848#define STREAM_PIX_FMT    AV_PIX_FMT_YUV420P /* default pix_fmt */
    4949
    5050#define SCALE_FLAGS SWS_BICUBIC
    static void add_stream(OutputStream *ost, AVFormatContext *oc, 
    149149
    150150        c->bit_rate = 400000;
    151151        /* Resolution must be a multiple of two. */
    152         c->width    = 352;
    153         c->height   = 288;
     152        c->width    = 640;
     153        c->height   = 480;
    154154        /* timebase: This is the fundamental unit of time (in seconds) in terms
    155155         * of which frame timestamps are represented. For fixed-fps content,
    156156         * timebase should be 1/framerate and timestamp increments should be
    static void add_stream(OutputStream *ost, AVFormatContext *oc, 
    170170             * the motion of the chroma plane does not match the luma plane. */
    171171            c->mb_decision = 2;
    172172        }
     173        c->slices = 16;
     174        c->level = 4;
     175        c->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
    173176    break;
    174177
    175178    default:
    int main(int argc, char **argv) 
    600603
    601604    /* Add the audio and video streams using the default format codecs
    602605     * and initialize the codecs. */
     606    fmt->video_codec = AV_CODEC_ID_FFV1;
     607
    603608    if (fmt->video_codec != AV_CODEC_ID_NONE) {
    604609        add_stream(&video_st, oc, &video_codec, fmt->video_codec);
    605610        have_video = 1;