[MPlayer-dev-eng] [PATCH] do not select empty audio track

Andrew Wason rectalogic at rectalogic.com
Tue Feb 3 20:33:49 CET 2009


Some webcams generate AVI files that have an audio stream that has no
data (webcam does not even have a mic).
Sample video http://www.rectalogic.com/video/empty-audio.avi

This is detected, but select_audio() selects the track anyway and this
can crash mencoder, e.g.:

mencoder empty-audio.avi -of lavf -lavfopts format=mov -ovc raw
-ffourcc 2vuy -vf format=uyvy -oac pcm -o out.mov

The attached patch changes demuxer_default_audio_track() to not return
a stream that is EOF.  Not sure this is the best approach, but it does
fix the problem.

Andrew

-- 
Andrew Wason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select_audio.diff
Type: text/x-diff
Size: 394 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090203/e04f529f/attachment.diff>


More information about the MPlayer-dev-eng mailing list