Mercurial > mplayer.hg
comparison mplayer.c @ 26818:089ac698f8b1
Avoid crash with video stream switching and -nosound
author | reimar |
---|---|
date | Wed, 21 May 2008 20:46:05 +0000 |
parents | a42c300ec8bf |
children | 6af954f69fe4 |
comparison
equal
deleted
inserted
replaced
26817:a0c157a99aac | 26818:089ac698f8b1 |
---|---|
3690 | 3690 |
3691 | 3691 |
3692 if(!mpctx->sh_video) { | 3692 if(!mpctx->sh_video) { |
3693 // handle audio-only case: | 3693 // handle audio-only case: |
3694 double a_pos=0; | 3694 double a_pos=0; |
3695 if(!quiet || end_at.type == END_AT_TIME ) | 3695 // sh_audio can be NULL due to video stream switching |
3696 // TODO: handle this better | |
3697 if((!quiet || end_at.type == END_AT_TIME) && mpctx->sh_audio) | |
3696 a_pos = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out); | 3698 a_pos = playing_audio_pts(mpctx->sh_audio, mpctx->d_audio, mpctx->audio_out); |
3697 | 3699 |
3698 if(!quiet) | 3700 if(!quiet) |
3699 print_status(a_pos, 0, 0); | 3701 print_status(a_pos, 0, 0); |
3700 | 3702 |