Ticket #3464: transcode_resize_fix.diff

File transcode_resize_fix.diff, 1.2 KB (added by bmayland@…, 14 years ago)

3 line patch

  • programs/mythtranscode/transcode.cpp

     
    664664    VideoOutput *videoOutput = nvp->getVideoOutput();
    665665    bool is_key = 0;
    666666    bool first_loop = true;
    667     unsigned char *newFrame = new unsigned char[newWidth * newHeight * 3 / 2];
     667    unsigned char *newFrame = new unsigned char[frame.size];
    668668
    669669    frame.buf = newFrame;
    670670    AVPicture imageIn, imageOut;
     
    853853                }
    854854                else
    855855                {
     856                    frame.buf = newFrame;
    856857                    avpicture_fill(&imageIn, lastDecode->buf, PIX_FMT_YUV420P,
    857858                                   video_width, video_height);
    858859                    avpicture_fill(&imageOut, frame.buf, PIX_FMT_YUV420P,
     
    905906            }
    906907            else
    907908            {
     909                frame.buf = newFrame;
    908910                avpicture_fill(&imageIn, lastDecode->buf, PIX_FMT_YUV420P,
    909911                               video_width, video_height);
    910912                avpicture_fill(&imageOut, frame.buf, PIX_FMT_YUV420P,