mpenkov / ffmpeg-tutorial

A set of tutorials that demonstrates how to write a video player based on FFmpeg
http://www.ffmpeg.org/documentation.html
1.22k stars 395 forks source link

Simplifying SaveFrame function #23

Open fenuks opened 10 years ago

fenuks commented 10 years ago

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.

mpenkov commented 10 years ago

Would you care to make a pull request?

fenuks commented 10 years ago

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.