Hi,

Am 25.03.2012 22:14, schrieb IOhannes m zmölnig:
> On 03/23/12 12:27, Burkhard Plaum wrote:
>> Hi,
>>
>> Am 23.03.2012 11:42, schrieb IOhannes m zmölnig:
>>> On 03/19/12 10:45, Burkhard Plaum wrote:
>>>>
>>>> Looks like you don't have libmpeg2 installed.
>>>> In this case gmerlin-avdecoder removes the video stream from the
>>>> internal structure, so every access to video stream 0 might result in a 
>>>> crash.
>>>>
>>>
>>> i understood, that this hints at a problem of the host application that
>>> would do some illegal call to bgav_read_video() or similar when there is
>>> no video stream present.
>>
>> If an application does anything with a video stream before calling
>> bgav_num_video_streams() it is an application bug.
>
> yes, that's what i thought that i was doing; but i didn't...
>
>>
>>> however, yesterday me and mark did a debugging session on his machine,
>>> and found that libgmerlin-avdec was crashing in the bgav_open() call.
>>
>> That would be different and of course I'd like to know where exactly the
>> crash happens.
>
> aye...here mark should chime in and provide that information.
>
>
> what we did was basically:
> <snip>
>     m_file = bgav_create();
>     if(!m_file) return false;
>     m_opt = bgav_get_options(m_file);
>     if(!m_opt) return false;
>     bgav_options_set_seek_subtitles(m_opt, 0);
>     bgav_options_set_sample_accurate(m_opt, 1);
>     bgav_options_set_log_callback(m_opt,
> log_callback, this);
>     if(!bgav_open(m_file, filename)) {close(); return;}
> </snip>

Looks ok.

>
> and we never survived the last line...

... for an MPEG video file, right?

Well I see no other way than single stepping with a debugger through this.
When I remember the valgrind output of your application ( 
http://pastebin.com/c9J6vQ7z ),
it was full of other errors in the code (and stopped on an unknown machine 
instruction).

But the valgrind output from bgavdump ( http://pastebin.com/sG68uYK9 )
has zero errors and simply points to the fact that libmpeg2 was missing.

I recently debugged a crash, which showed up at a completely different place in 
the
code, because the memory was corrupted somewhere else. And valgrind did *not* 
detect
this. 6 hours of seeking the problem and then 4 lines to fix it :)

Burkhard

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Gmerlin-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmerlin-general

Reply via email to