diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dec_video.c | 1 | ||||
-rw-r--r-- | video/out/cocoa_common.m | 1 | ||||
-rw-r--r-- | video/out/vo_lavc.c | 11 |
3 files changed, 7 insertions, 6 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 3401ff69f8..ed856e046c 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -29,7 +29,6 @@ #include "core/mp_msg.h" #include "osdep/timer.h" -#include "osdep/shmem.h" #include "stream/stream.h" #include "demux/demux.h" diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index b5de22f951..0e61b7ea71 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -38,6 +38,7 @@ #include "osdep/macosx_application.h" #include "osdep/macosx_events.h" +#include "osdep/macosx_compat.h" @interface GLMPlayerWindow : NSWindow <NSWindowDelegate> - (BOOL)canBecomeKeyWindow; diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c index ca3f1c5a5f..ffc565f0bf 100644 --- a/video/out/vo_lavc.c +++ b/video/out/vo_lavc.c @@ -278,7 +278,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) { struct priv *vc = vo->priv; struct encode_lavc_context *ectx = vo->encode_lavc_ctx; - int i, size; + int size; AVFrame *frame; AVCodecContext *avc; int64_t frameipts; @@ -428,10 +428,11 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) frame->pts = av_rescale_q(vc->lastipts + skipframes, vc->worst_time_base, avc->time_base); - for (i = 0; i < 4; i++) { - frame->data[i] = vc->lastimg->planes[i]; - frame->linesize[i] = vc->lastimg->stride[i]; - } + enum AVPictureType savetype = frame->pict_type; + mp_image_copy_fields_to_av_frame(frame, vc->lastimg); + frame->pict_type = savetype; + // keep this at avcodec_get_frame_defaults default + frame->quality = avc->global_quality; av_init_packet(&packet); |