Ticket #53325: patch-0001-avwrapper-avframealloc-fix.diff

File patch-0001-avwrapper-avframealloc-fix.diff, 1.0 KB (added by kencu (Ken), 8 years ago)
  • ./hedgewars/avwrapper/avwrapper.c

    old new  
    158158    else
    159159        g_NumSamples = g_pAudio->frame_size;
    160160    g_pSamples = (int16_t*)av_malloc(g_NumSamples*g_Channels*sizeof(int16_t));
    161     g_pAFrame = avcodec_alloc_frame();
     161    g_pAFrame = av_frame_alloc();
    162162    if (!g_pAFrame)
    163163    {
    164164        Log("Could not allocate frame\n");
     
    241241    g_pVideo->time_base.den = g_Framerate.num;
    242242    g_pVideo->time_base.num = g_Framerate.den;
    243243    //g_pVideo->gop_size = 12; /* emit one intra frame every twelve frames at most */
    244     g_pVideo->pix_fmt = PIX_FMT_YUV420P;
     244    g_pVideo->pix_fmt = AV_PIX_FMT_YUV420P;
    245245
    246246    // set quality
    247247    if (g_VQuality > 100)
     
    299299#endif
    300300        return FatalError("Could not open video codec %s", g_pVCodec->long_name);
    301301
    302     g_pVFrame = avcodec_alloc_frame();
     302    g_pVFrame = av_frame_alloc();
    303303    if (!g_pVFrame)
    304304        return FatalError("Could not allocate frame");
    305305