Commit c309365f authored by dscho's avatar dscho

fix compilation for LIBAVCODEC_BUILD==4754

parent 963cb8f6
...@@ -65,8 +65,13 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id, int w, int h) ...@@ -65,8 +65,13 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id, int w, int h)
c->width = w; c->width = w;
c->height = h; c->height = h;
/* frames per second */ /* frames per second */
#if LIBAVCODEC_BUILD<4754
c->frame_rate = STREAM_FRAME_RATE; c->frame_rate = STREAM_FRAME_RATE;
c->frame_rate_base = 1; c->frame_rate_base = 1;
#else
c->time_base.den = STREAM_FRAME_RATE;
c->time_base.num = 1;
#endif
c->gop_size = 12; /* emit one intra frame every twelve frames at most */ c->gop_size = 12; /* emit one intra frame every twelve frames at most */
if (c->codec_id == CODEC_ID_MPEG2VIDEO) { if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
/* just for testing, we also add B frames */ /* just for testing, we also add B frames */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment