Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numBytes = avpicture_get_size((enum PixelFormat)frame->format, frame->width, frame->height);
- buffer = (uint8_t*)malloc(numBytes);
- avpicture_layout((AVPicture*)frame, (enum PixelFormat)frame->format, frame->width, frame->height, buffer, numBytes);
- sws_scale(swsContext, frame->data, frame->linesize, 0, frame->height, frameSlice, &frameStride);
- std::cout << "works!" << std::endl;
- sws_scale(swsContext, (uint8_t const * const *)buffer, frame->linesize, 0, frame->height, frameSlice, &frameStride);
- std::cout << "crash!" << std::endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement