It is difficult to specify the memory location when copying the decoded yuv plane.
1: Declare memory to be used as buffer and allocate parm.psize[plane] size
2: Open the file in append mode
3: Try memcpy with reference to the above commented stream->write
4. Write to file with fwrite() function
5. free allocated memory
Is there any part you can give advice on when specifying the memory location and size in steps 1-5?
For parameters, I refer to the structure(NvBufferParams) of the following file.