]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nvdec.c
avformat: Switch AVChapter.id to 64bits
[ffmpeg] / libavcodec / nvdec.c
index 48281293ce3f025c9ef8dc2cb99380ad0a77f2a0..d6b6608866f4b501708f9df510f372b7588f98e7 100644 (file)
@@ -83,6 +83,9 @@ static int map_chroma_format(enum AVPixelFormat pix_fmt)
 {
     int shift_h = 0, shift_v = 0;
 
+    if (av_pix_fmt_count_planes(pix_fmt) == 1)
+        return cudaVideoChromaFormat_Monochrome;
+
     av_pix_fmt_get_chroma_sub_sample(pix_fmt, &shift_h, &shift_v);
 
     if (shift_h == 1 && shift_v == 1)
@@ -239,7 +242,7 @@ fail:
     return ret;
 }
 
-static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, int size)
+static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, buffer_size_t size)
 {
     NVDECFramePool *pool = opaque;
     AVBufferRef *ret;
@@ -280,7 +283,7 @@ static void nvdec_free_dummy(struct AVHWFramesContext *ctx)
     av_buffer_pool_uninit(&ctx->pool);
 }
 
-static AVBufferRef *nvdec_alloc_dummy(int size)
+static AVBufferRef *nvdec_alloc_dummy(buffer_size_t size)
 {
     return av_buffer_create(NULL, 0, NULL, NULL, 0);
 }