vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Jul 24 19:14:50 2013 +0300| [6da5c9b0cd33b1935da7510f0d47c8e7aaee01ef] | committer: Rémi Denis-Courmont
avcodec: add assertion after vlc_va_Get() + cosmetics > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6da5c9b0cd33b1935da7510f0d47c8e7aaee01ef --- modules/codec/avcodec/video.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c index fe21d75..4c0dfd8 100644 --- a/modules/codec/avcodec/video.c +++ b/modules/codec/avcodec/video.c @@ -909,7 +909,8 @@ static void lavc_va_ReleaseFrame(void *opaque, uint8_t *data) (void) data; } -static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame) +static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, + int flags) { decoder_t *dec = ctx->opaque; decoder_sys_t *sys = dec->p_sys; @@ -943,6 +944,9 @@ static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame) lavc_va_ReleaseFrame(ref, frame->data[0]); return -1; } + assert(frame->data[0] != NULL); + assert(frame->data[3] != NULL); + (void) flags; return 0; } @@ -962,7 +966,7 @@ static void lavc_dr_ReleaseFrame(void *opaque, uint8_t *data) } static picture_t *lavc_dr_GetFrame(struct AVCodecContext *ctx, - AVFrame *frame, unsigned flags) + AVFrame *frame, int flags) { decoder_t *dec = (decoder_t *)ctx->opaque; @@ -1047,7 +1051,7 @@ static int lavc_GetFrame(struct AVCodecContext *ctx, AVFrame *frame, int flags) } if (sys->p_va != NULL) - return lavc_va_GetFrame(ctx, frame); + return lavc_va_GetFrame(ctx, frame, flags); frame->opaque = NULL; if (!sys->b_direct_rendering) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
