Hi Nathan,
On Sat, Sep 28, 2013 at 9:02 PM, Nathan <
nathan...@gmail.com> wrote:
> I created a new issue (#54) for it:
https://github.com/AVbin/AVbin/issues/54
>
> In the issue I put a link to the three files that I have personally used to
> see the bad behavior and test my fix attempts. All three of these files
> were given to me by actual users who were frustrated that they were not
> decoding and playing correctly.
Although, AVPacket usage in avbin is wrong, and there are other memory
management errors. The actual cause of bad playback is skipping
packets. The following patch fixes the issues with both videos (not
sure why audio fails yet):
diff -r 056abb79c86b pyglet/media/avbin.py
--- a/pyglet/media/avbin.py Thu Aug 15 23:58:18 2013 +0300
+++ b/pyglet/media/avbin.py Sun Sep 29 00:51:14 2013 +0300
@@ -374,12 +374,13 @@
if self._packet.stream_index == self._video_stream_index:
if self._packet.timestamp < 0:
+ print("TIMESTAMP", self._packet.timestamp)
# XXX TODO
# AVbin needs hack to decode timestamp for B frames in
# some containers (OGG?). See
#
http://www.dranger.com/ffmpeg/tutorial05.html
# For now we just drop these frames.
- return None, None
+ # return None, None
video_packet = VideoPacket(self._packet)
I may investigate more later. Just keeping you informed.
--
Paul