AprilAndFriends / theoraplayer

A multi-threaded C++ library that plays video files supporting multiple codecs across platforms. Easy to use, fast, responsive, abstract interface and minimal dependencies, you'll soon be wondering how you lived without it! ;) Audio and Video interfaces are completely abstracted so the library can be used anywhere, regardless of what you use to display video frames and play audio samples (eg. OpenGL / OpenAL, Direct3D / DirectSound?, SDL / SDL_mixer, X11 / alsa ...) The library can pre-cache video frames and decoded audio samples for maximum efficiency and smooth playback, even on single-cpu systems. Currently, the library supports Theora on Windows, Mac, iOS, Linux, Android, WinRT and Windows Phone. H.264 is supported on Mac and iOS.
BSD 3-Clause "New" or "Revised" License
84 stars 43 forks source link

AutoRestart: looping media files - only video restarts, but not sound #5

Open dk2git opened 8 years ago

dk2git commented 8 years ago

As the title says, in looping media files (the ones with AutoRestart property), the sound track no longer seems to restart, only video does. So we have a situation where video plays/loops indefinitely but the sound plays only once.

This didn't seem to be a problem in theoraplayer 1.0.0, so it looks like the issue was introduced after 1.0.0.

kspes commented 8 years ago

Hmm, odd. Can you reproduce this in the av_player demo? if so, I can probably fix it easily.

dk2git commented 8 years ago

I've never used av_player, however I have 100% reproducibility using the Big Buck Bunny movie (bunny.ogv 4.4 MB) and my simple command line program that displays the video using some ASCII-characters. I can send you this program privately if you'd like. When you run the program, you can see that the video loops indefinitely but the sound plays only once. That is not the case if I link my program with libtheorplayer 1.0.0. With the 1.0.0 lib both the video and sound loop forever as expected.

I was able to determine that this difference in behaviour is caused by changes to TheoraVideoClip.cpp and/or TheoraVideoClip_Theora.cpp and no other files. However I didn't figure out yet what change specifically is responsible for this.

kspes commented 8 years ago

sure, send it to me at kspes<!aT!>cateia{D.O.T}com

Celestria commented 7 years ago

This issue is still present in the latest master (18-1-2017)

Celestria commented 7 years ago

Reproduce by just starting the av demo. When it reaches the end and loops the video will play fine but the sound will not restart and is silent.

kspes commented 7 years ago

ok, cool, we'll investigate and let you know