From: Darren S. <li...@yo...> - 2010-02-07 16:30:46
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1265560176 0 # Node ID 122d572f5923deb84fb0ceb021f5a6f614256f28 # Parent 8270bb628ad0799ecc73c6326cccba157a7f0ca8 Compiler warning fixes. diff --git a/src/video_dec/libvdpau/cpb.c b/src/video_dec/libvdpau/cpb.c --- a/src/video_dec/libvdpau/cpb.c +++ b/src/video_dec/libvdpau/cpb.c @@ -19,6 +19,10 @@ * * cpb.c: Coded Picture Buffer */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "cpb.h" diff --git a/src/video_dec/libvdpau/cpb.h b/src/video_dec/libvdpau/cpb.h --- a/src/video_dec/libvdpau/cpb.h +++ b/src/video_dec/libvdpau/cpb.h @@ -61,7 +61,7 @@ struct nal_unit *slc_nal; }; -struct coded_picture* create_coded_picture(); +struct coded_picture* create_coded_picture(void); void free_coded_picture(struct coded_picture *pic); #endif /* CPB_H_ */ diff --git a/src/video_dec/libvdpau/dpb.c b/src/video_dec/libvdpau/dpb.c --- a/src/video_dec/libvdpau/dpb.c +++ b/src/video_dec/libvdpau/dpb.c @@ -19,6 +19,10 @@ * * dpb.c: Implementing Decoded Picture Buffer */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> @@ -113,6 +117,8 @@ pic = pic->next; } + + return NULL; } struct decoded_picture* dpb_get_next_out_picture(struct dpb *dpb, int do_flush) diff --git a/src/video_dec/libvdpau/h264_parser.c b/src/video_dec/libvdpau/h264_parser.c --- a/src/video_dec/libvdpau/h264_parser.c +++ b/src/video_dec/libvdpau/h264_parser.c @@ -19,6 +19,10 @@ * * h264_parser.c: Almost full-features H264 NAL-Parser */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> @@ -1662,7 +1666,8 @@ int32_t offset = 0; int start_seq_len = 3; - *ret_pic = *ret_buf = NULL; + *ret_pic = NULL; + *ret_buf = NULL; *ret_len = 0; if(parser->nal_size_length > 0) diff --git a/src/video_dec/libvdpau/nal.c b/src/video_dec/libvdpau/nal.c --- a/src/video_dec/libvdpau/nal.c +++ b/src/video_dec/libvdpau/nal.c @@ -19,6 +19,10 @@ * * nal.c: nal-structure utility functions */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> diff --git a/src/video_dec/libvdpau/nal.h b/src/video_dec/libvdpau/nal.h --- a/src/video_dec/libvdpau/nal.h +++ b/src/video_dec/libvdpau/nal.h @@ -487,7 +487,7 @@ uint32_t pic_parameter_set_id); struct nal_unit* nal_buffer_get_last(struct nal_buffer *nal_buffer); -struct nal_unit* create_nal_unit(); +struct nal_unit* create_nal_unit(void); void lock_nal_unit(struct nal_unit *nal); void release_nal_unit(struct nal_unit *nal); void copy_nal_unit(struct nal_unit *dest, struct nal_unit *src); diff --git a/src/video_dec/libvdpau/vdpau_h264.c b/src/video_dec/libvdpau/vdpau_h264.c --- a/src/video_dec/libvdpau/vdpau_h264.c +++ b/src/video_dec/libvdpau/vdpau_h264.c @@ -21,6 +21,10 @@ * * vdpau_h264.c: H264 Video Decoder utilizing nvidia VDPAU engine */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> @@ -657,7 +661,7 @@ this->wait_for_frame_start = 0; len += parse_frame(this->nal_parser, buf->content + len, buf->size - len, buf->pts, - (uint8_t*)&vdp_buffer.bitstream, &vdp_buffer.bitstream_bytes, &this->completed_pic); + (uint8_t**)&vdp_buffer.bitstream, &vdp_buffer.bitstream_bytes, &this->completed_pic); if(this->decoder == VDP_INVALID_HANDLE && this->completed_pic && diff --git a/src/video_dec/libvdpau/vdpau_mpeg12.c b/src/video_dec/libvdpau/vdpau_mpeg12.c --- a/src/video_dec/libvdpau/vdpau_mpeg12.c +++ b/src/video_dec/libvdpau/vdpau_mpeg12.c @@ -25,6 +25,9 @@ /*#define LOG*/ #define LOG_MODULE "vdpau_mpeg12" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> @@ -925,7 +928,7 @@ VdpStatus st = accel->vdp_decoder_create( accel->vdp_device, VDP_DECODER_PROFILE_MPEG2_MAIN, 1920, 1080, 2, &decoder ); if ( st!=VDP_STATUS_OK ) { lprintf( "can't create vdpau decoder.\n" ); - return 1; + return NULL; } accel->vdp_decoder_destroy( decoder ); diff --git a/src/video_dec/libvdpau/vdpau_vc1.c b/src/video_dec/libvdpau/vdpau_vc1.c --- a/src/video_dec/libvdpau/vdpau_vc1.c +++ b/src/video_dec/libvdpau/vdpau_vc1.c @@ -25,6 +25,9 @@ /*#define LOG*/ #define LOG_MODULE "vdpau_vc1" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <stdlib.h> @@ -1078,7 +1081,7 @@ VdpStatus st = accel->vdp_decoder_create( accel->vdp_device, VDP_DECODER_PROFILE_VC1_MAIN, 1920, 1080, 2, &decoder ); if ( st!=VDP_STATUS_OK ) { lprintf( "can't create vdpau decoder.\n" ); - return 1; + return NULL; } accel->vdp_decoder_destroy( decoder ); |