From 3f89b49b07380e94a5685819fc7014b36d8ad1f2 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 5 Jan 2013 00:20:33 +0100 Subject: [PATCH 1/3] finalize changelog for version 9 --- Changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index cbcfe31b59..92098cacd5 100644 --- a/Changelog +++ b/Changelog @@ -1,10 +1,11 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version : +version 9: - av_basename and av_dirname - adobe and limelight publisher authentication in RTMP + version 9_beta3: - ashowinfo audio filter - 24-bit FLAC encoding From 3b81bba3bc5aca98d891cb377d27566de4745225 Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Fri, 4 Jan 2013 21:09:47 +0000 Subject: [PATCH 2/3] mxfdec: fix NULL checking in mxf_get_sorted_table_segments() The following out-of-memory check is broken. *sorted_segments = av_mallocz(...); if (!sorted_segments) { ... } The correct NULL check should use *sorted_segments. Signed-off-by: Xi Wang Signed-off-by: Derek Buitenhuis --- libavformat/mxfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 61b9c687e1..18f7b26fa1 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -955,7 +955,7 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment *sorted_segments = av_mallocz(nb_segments * sizeof(**sorted_segments)); unsorted_segments = av_mallocz(nb_segments * sizeof(*unsorted_segments)); - if (!sorted_segments || !unsorted_segments) { + if (!*sorted_segments || !unsorted_segments) { av_freep(sorted_segments); av_free(unsorted_segments); return AVERROR(ENOMEM); From f73f76fd202b310e8e1d0215b2e0cf038cd18c4a Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Fri, 4 Jan 2013 21:15:33 +0000 Subject: [PATCH 3/3] swscale: fix NULL checking in sws_alloc_context() sws_getCachedContext() and sws_getContext() expect sws_alloc_context() to return NULL when out of memory, as follows. if (!(context = sws_alloc_context())) return NULL; This patch fixes sws_alloc_context() to return NULL in that case. Signed-off-by: Xi Wang Signed-off-by: Derek Buitenhuis --- libswscale/utils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index e5e4d60dd2..f0a2b464fc 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -844,8 +844,10 @@ SwsContext *sws_alloc_context(void) { SwsContext *c = av_mallocz(sizeof(SwsContext)); - c->av_class = &sws_context_class; - av_opt_set_defaults(c); + if (c) { + c->av_class = &sws_context_class; + av_opt_set_defaults(c); + } return c; }