Skip to content

Commit

Permalink
Add framerate in the video stream to be written in the file header
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Aug 11, 2018
1 parent aa9329d commit 9f9e008
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libTAS/AVEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ AVEncoder::AVEncoder(SDL_Window* window, unsigned long sf) {
ret = avcodec_parameters_from_context(video_st->codecpar, video_codec_context);
ASSERT_RETURN_VOID(ret >= 0, "Could not copy the stream parameters");

/* Copy the framerate for the stream header */
video_st->avg_frame_rate = video_codec_context->time_base;

/*** Create audio stream ***/

/* Initialize audio AVCodec */
Expand Down

0 comments on commit 9f9e008

Please sign in to comment.