Quentin Renard

Results 338 comments of Quentin Renard

@l0rem1psum we can also remove the example from the PR and merge it like this, and I can add the example later 👍

FYI I've picked up the PR and merged it 👍

I may have misunderstood your code but aren't you copying all data to a buffer in memory (hence the memory increasing over time) before writing all data to a file...

Got it 👍 I don't know how `videoBuf := buffer.NewEmptyBuffer()` works internally, but if writing into it append data to a `[]byte` then it explains the increase in memory over...

Since writing in the buffer appends data to a `[]byte` in memory, it seems logical memory usage increases over time 🤔

> My logic will free videoBuf's memory every five seconds. Where is it done? I don't see it in the code you've shared. What I see is that the videoBuf's...

When reaching the end your code, memory should be fine. However I don't really get your "every five seconds", since I don't see anything related to a 5 seconds interval...

Could you share the code and the error you're getting? Anyway check out [this part](https://github.com/asticode/go-astiav/blob/master/examples/demuxing_decoding/main.go#L143) of the `Demuxing/Decoding` example on how to properly generate a go image with the data...

You could use a filter instead (checkout `format` and possibly `hwdownload` as well as the [example](https://github.com/asticode/go-astiav/blob/master/examples/filtering/main.go)) and if your goal is to transcode checkout [this example](https://github.com/asticode/go-astiav/blob/master/examples/transcoding/main.go)