Merge pull request #1120 from pkviet/ffmpeg
obs-ffmpeg: Fix ffmpeg output recording in x264
This commit is contained in:
commit
05a8969439
@ -700,8 +700,8 @@ static void receive_video(void *param, struct video_data *frame)
|
||||
data->vframe->linesize);
|
||||
else
|
||||
copy_data(data->vframe, frame, context->height, context->pix_fmt);
|
||||
|
||||
if (data->output->flags) {
|
||||
#if LIBAVFORMAT_VERSION_MAJOR < 58
|
||||
if (data->output->flags & AVFMT_RAWPICTURE) {
|
||||
packet.flags |= AV_PKT_FLAG_KEY;
|
||||
packet.stream_index = data->video->index;
|
||||
packet.data = data->vframe->data[0];
|
||||
@ -713,6 +713,7 @@ static void receive_video(void *param, struct video_data *frame)
|
||||
os_sem_post(output->write_sem);
|
||||
|
||||
} else {
|
||||
#endif
|
||||
data->vframe->pts = data->total_frames;
|
||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 40, 101)
|
||||
ret = avcodec_send_frame(context, data->vframe);
|
||||
@ -749,8 +750,9 @@ static void receive_video(void *param, struct video_data *frame)
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
#if LIBAVFORMAT_VERSION_MAJOR < 58
|
||||
}
|
||||
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
blog(LOG_WARNING, "receive_video: Error writing video: %s",
|
||||
av_err2str(ret));
|
||||
|
Loading…
x
Reference in New Issue
Block a user