ffmpeg-tutorial
ffmpeg-tutorial copied to clipboard
Simplifying SaveFrame function
This:
for(y=0; y<height; y++){
fwrite(pFrame->data[0]+y*pFrame->linesize[0], 1, width*3, pFile);
can be done with this:
fwrite(pFrame->data[0], 1, width*height*3, pFile);
which is easier to understand, at least for me, since I'm not acknowledged with ffmpeg.
Would you care to make a pull request?
I would, but is there any sense? It's about deleting 2 lines of code and adding one. In order to make pull request I would have to fork repo. It's not worth the efford, but if you insist I'll make pull request.