mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-29 12:26:20 +08:00
- ffmpeg relies on libavcodec to repeat frames from 3:2 sources.
Originally committed as revision 487 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
6
ffmpeg.c
6
ffmpeg.c
@ -489,11 +489,11 @@ static void do_video_out(AVFormatContext *s,
|
|||||||
ret = avcodec_encode_video(enc,
|
ret = avcodec_encode_video(enc,
|
||||||
video_buffer, sizeof(video_buffer),
|
video_buffer, sizeof(video_buffer),
|
||||||
picture);
|
picture);
|
||||||
//enc->frame_number = enc->r_pict_num;
|
//enc->frame_number = enc->real_pict_num;
|
||||||
s->format->write_packet(s, ost->index, video_buffer, ret, 0);
|
s->format->write_packet(s, ost->index, video_buffer, ret, 0);
|
||||||
*frame_size = ret;
|
*frame_size = ret;
|
||||||
//fprintf(stderr,"\nFrame: %3d %3d size: %5d type: %d",
|
//fprintf(stderr,"\nFrame: %3d %3d size: %5d type: %d",
|
||||||
// enc->frame_number-1, enc->r_pict_num, ret,
|
// enc->frame_number-1, enc->real_pict_num, ret,
|
||||||
// enc->pict_type);
|
// enc->pict_type);
|
||||||
} else {
|
} else {
|
||||||
write_picture(s, ost->index, picture, enc->pix_fmt, enc->width, enc->height);
|
write_picture(s, ost->index, picture, enc->pix_fmt, enc->width, enc->height);
|
||||||
@ -841,6 +841,8 @@ static int av_encode(AVFormatContext **output_files,
|
|||||||
ist->file_index, ist->index);
|
ist->file_index, ist->index);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
if (ist->st->codec.codec_type == CODEC_TYPE_VIDEO)
|
||||||
|
ist->st->codec.repeat_pict = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user