Skip to content

Commit

Permalink
in FFmpeg, replace invalid encoded-width/height with display-width/he…
Browse files Browse the repository at this point in the history
…ight.

git-svn-id: http://movist.googlecode.com/svn/trunk@268 9988c26d-9134-0410-b5bb-5778289bb252
  • Loading branch information
cocoable committed Jun 3, 2009
1 parent c1b057d commit 1a4ae00
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MMovie.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ + (MTrack*)videoTrackWithAVStream:(AVStream*)stream streamIndex:(int)streamIndex
{
AVCodecContext* codecContext = stream->codec;

// fix some strange codec_width/height with display-width/height.
if (codecContext->coded_width == 0 && codecContext->coded_height == 0) {
codecContext->coded_width = codecContext->width;
codecContext->coded_height = codecContext->height;
}

NSString* fourCC = nil;
if (codecContext->codec_tag != 0) {
unsigned int tag = codecContext->codec_tag;
Expand Down

0 comments on commit 1a4ae00

Please sign in to comment.