[mythtv] DVB aspect change mid-stream loses frames?

Ed Wildgoose lists at wildgooses.com
Tue Feb 1 19:27:35 EST 2005


Steve Davies wrote:

> Hi,
>
> I have noticed recently that if the aspect ratio of a DVB stream 
> changes during playback, then a number of frames and some audio are 
> dropped as a result of the switch (as if the current buffers are 
> flushed). This occurs in both directions 4:3->16:9 and vice versa.
>
> I am quite sure that this was not the case late last year, but cannot 
> say for sure when it might have changed. I have trawled CVS and the 
> commits list for clues, and my favourite CVS log entry on the subject 
> has to be revision 1.386 (14/11/2004) of NuppelVideplayer.cpp where 
> the ReinitVideo() call was added on aspect change. This seems to 
> request a buffer cleardown as if a seek has been made, which would (I 
> believe) lose a chunk of frames.
>
> Can anyone comment on the advisability of commenting out the final 
> ClearAfterSeek() call in ReinitVideo, or even suggest a fix for me?



Well, it probably needs to be put into a special case function because I 
think ReinitVideo is called for other reasons as well.  I agree though 
that it is annoying - you lose the last second of audio before an advert 
break.

Also slightly annoying while we are talking about this issue is that the 
ReinitVideo is called when the frame is *decoded*, rather than when it 
is displayed.  So usually I get the last few frames of the show 
stretched a little, and then the new stuff appears in the correct aspect 
ratio.

I guess we need a less vigorous function to just handle the aspect ratio 
change and for it really to be triggered when the frame is displayed (or 
perhaps just for the decoder to make a note of the issue and call the 
Reinit function some X frames later, where this is the number of frames 
ahead that we are decoding...)

Ed W


More information about the mythtv-dev mailing list