aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-18 11:22:35 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-18 11:22:35 +0000
commit2de28abbfd3d4d7a8cd5a6c04a35273945049dc2 (patch)
treef4a691e328f3167853abab905c98332aa80869ac /ffmpeg.c
parenta4d36c1113a8858b2c2c85be724136f3b4d768ac (diff)
downloadffmpeg-2de28abbfd3d4d7a8cd5a6c04a35273945049dc2.tar.gz
10l (segfault fix)
Originally committed as revision 3029 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 5c8a84d010..689e6c0bf2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1422,16 +1422,17 @@ static int av_encode(AVFormatContext **output_files,
ost->padleft = frame_padleft;
ost->padbottom = frame_padbottom;
ost->padright = frame_padright;
+ avcodec_get_frame_defaults(&ost->pict_tmp);
if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P,
codec->width, codec->height ) )
goto fail;
} else {
ost->video_resample = 1;
ost->video_crop = 0; // cropping is handled as part of resample
+ avcodec_get_frame_defaults(&ost->pict_tmp);
if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, PIX_FMT_YUV420P,
codec->width, codec->height ) )
goto fail;
- avcodec_get_frame_defaults(&ost->pict_tmp);
ost->img_resample_ctx = img_resample_full_init(
ost->st->codec.width, ost->st->codec.height,