Skip to content

Commit

Permalink
Use the current video aspect ratio if the video stream is reset.
Browse files Browse the repository at this point in the history
In AvFormatDecoder, if a stream change is detected and no
new/replacement video stream is found, we choose some sensible defaults
and tell the player about the change. The video aspect ratio is however
reset to the default 4/3 - which immediately changes the currently
displayed frames. Instead use a pre-existing aspect ratio, which will be
4/3 by default if we haven't yet determined something more sensible.

This is only likely to be an issue with DVD playback, where we often get
stream updates piecemeal from the demuxer - the streams are reset and
some new audio streams added (no video found) and the new video stream
is added a 'short' period of time later.

Refs #9854
  • Loading branch information
Mark Kendall committed Jun 20, 2011
1 parent 88023ee commit d3b95c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/avformatdecoder.cpp
Expand Up @@ -2155,12 +2155,12 @@ int AvFormatDecoder::ScanStreams(bool novideo)
tvformat == "pal-m" || tvformat == "atsc")
{
fps = 29.97;
m_parent->SetVideoParams(-1, -1, 29.97, 1);
m_parent->SetVideoParams(-1, -1, 29.97, 1, current_aspect);
}
else
{
fps = 25.0;
m_parent->SetVideoParams(-1, -1, 25.0, 1);
m_parent->SetVideoParams(-1, -1, 25.0, 1, current_aspect);
}
}

Expand Down

0 comments on commit d3b95c8

Please sign in to comment.