Permalink
Browse files

in FFmpeg, replace invalid encoded-width/height with display-width/he…

…ight.

git-svn-id: http://movist.googlecode.com/svn/trunk@268 9988c26d-9134-0410-b5bb-5778289bb252
  • Loading branch information...
1 parent c1b057d commit 1a4ae00eb3f8a7b3435bbbf47f5fc31984471a69 cocoable committed Jun 3, 2009
Showing with 6 additions and 0 deletions.
  1. +6 −0 MMovie.m
View
6 MMovie.m
@@ -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;

0 comments on commit 1a4ae00

Please sign in to comment.