Re: [Libav-user] Segfault on corrupted video

2012-06-28 Thread Alex Cohn
On Thu, Jun 28, 2012 at 4:17 AM, Michael Bradshaw mbrads...@sorensonmedia.com wrote: On Wed, Jun 27, 2012 at 6:26 PM, Tim Pitman tapitma...@gmail.com wrote: Interesting. However, I'm using x264 with --intra-refresh and --tune zerolatency (no b frames). Sorry, I missed that part. At any

Re: [Libav-user] Segfault on corrupted video

2012-06-28 Thread Tim Pitman
I'm not sure exactly what you mean, but yes as near as I can tell it only freezes after packet loss. It was hard to tell when it was freezing because there wasn't a lot of motion in the video but I'm going to play with it some more today and try to identify more solid patterns. On Wed, Jun 27,

Re: [Libav-user] Segfault on corrupted video

2012-06-27 Thread Tim Pitman
After continued debugging I've narrowed things down somewhat. after getting a picture from avcodec_decode_video2, I pass the data from the picture to glTexImage2D, which is what seems to be crashing. When I backtrace with gdb it says the the address stored in picture-data[0] is out of bounds. So

Re: [Libav-user] Segfault on corrupted video

2012-06-27 Thread Tim Pitman
Alrighty, I was relying on the return value from avcodec_decode_video2. Basically I assumed that if it was 0 then the picture was valid. However, I was curious about what got_picture was for so if changed: if (ret 0) to if (ret 0 got_picture) It no longer crashes, but instead seems to

Re: [Libav-user] Segfault on corrupted video

2012-06-27 Thread Michael Bradshaw
On Wed, Jun 27, 2012 at 5:58 PM, Tim Pitman tapitma...@gmail.com wrote: Alrighty, I was relying on the return value from avcodec_decode_video2. Basically I assumed that if it was 0 then the picture was valid. However, I was curious about what got_picture was for so if changed: if (ret 0)

Re: [Libav-user] Segfault on corrupted video

2012-06-27 Thread Tim Pitman
Interesting. However, I'm using x264 with --intra-refresh and --tune zerolatency (no b frames). On Wed, Jun 27, 2012 at 5:13 PM, Michael Bradshaw mbrads...@sorensonmedia.com wrote: On Wed, Jun 27, 2012 at 5:58 PM, Tim Pitman tapitma...@gmail.com wrote: Alrighty, I was relying on the return

Re: [Libav-user] Segfault on corrupted video

2012-06-27 Thread Michael Bradshaw
On Wed, Jun 27, 2012 at 6:26 PM, Tim Pitman tapitma...@gmail.com wrote: Interesting. However, I'm using x264 with --intra-refresh and --tune zerolatency (no b frames). Sorry, I missed that part. ___ Libav-user mailing list Libav-user@ffmpeg.org

Re: [Libav-user] Segfault on corrupted video

2012-06-26 Thread Carl Eugen Hoyos
Tim Pitman tapitman11@... writes: There are lots of errors but mostly they just result in artifacts, which is exactly what I want to happen. However, when the channel is bad libav segfaults with: mmco: unref short failure (Crashes are always important bugs) Can you reproduce the bug with

Re: [Libav-user] Segfault on corrupted video

2012-06-26 Thread Tim Pitman
Ok, I did some more testing, and the problem is not reproducible with either ffmpeg or ffplay. I created a dump of the corrupted video stream. When I play it back through my player it crashes but ffplay just throws some new errors and then stops and the end of the video. Any ideas? On Tue, Jun

Re: [Libav-user] Segfault on corrupted video

2012-06-26 Thread Tim Pitman
After using gdb to run a backtrace it looks like my problem may be in my OpenGL rendering. Sorry about that. However, I still have one general question: When it comes to error detection in situations like this, is dropping corrupted data at the NALU level a good way to go, or is there a better