ffmpeg-tutorial icon indicating copy to clipboard operation
ffmpeg-tutorial copied to clipboard

Simplifying SaveFrame function

Open fenuks opened this issue 11 years ago • 2 comments

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.

fenuks avatar Feb 23 '14 20:02 fenuks

Would you care to make a pull request?

mpenkov avatar Feb 24 '14 01:02 mpenkov

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.

fenuks avatar Feb 25 '14 18:02 fenuks