summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-07 15:21:39 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-07 15:21:39 +0100
commit545be54bdc7e0879cab0d5bb964816b88a354c72 (patch)
tree5c7ca19c9ef302076d3525f6f7cc4480b8ba0619
parente439a7fea30aab82fc5b704d9afdf3e63795464a (diff)
downloadxine-lib-545be54bdc7e0879cab0d5bb964816b88a354c72.tar.gz
xine-lib-545be54bdc7e0879cab0d5bb964816b88a354c72.tar.bz2
Don't try to free the frame if it's not allocated. Fixes bug FS#3.
-rw-r--r--ChangeLog2
-rw-r--r--src/libffmpeg/ff_video_decoder.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d2f98b32d..68dfbe3e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,7 +14,7 @@ xine-lib (1.1.9) (unreleased)
This requires conversion to UTF-8 of entities with codes >= 128.
* Fixed ATSC support. [Bug 1749508]
* Fixed a possible DVB plugin crash when switching channels.
- * Fixed ogg demuxer to not discard data at the end of the stream.
+ * Fixed a crash closing the frontend. [Bug FS#3]
* Fixed deadlock on ao_close while paused.
* Nicer wakeup behaviour, using select instead of nanosleep (800 -> 100
wakeups/s).
diff --git a/src/libffmpeg/ff_video_decoder.c b/src/libffmpeg/ff_video_decoder.c
index 8fc9cc8cb..1e32ad3a6 100644
--- a/src/libffmpeg/ff_video_decoder.c
+++ b/src/libffmpeg/ff_video_decoder.c
@@ -215,12 +215,14 @@ static void release_buffer(struct AVCodecContext *context, AVFrame *av_frame){
ff_video_decoder_t *this = (ff_video_decoder_t *)context->opaque;
if (av_frame->type == FF_BUFFER_TYPE_USER) {
- vo_frame_t *img = (vo_frame_t *)av_frame->opaque;
+ if ( av_frame->opaque ) {
+ vo_frame_t *img = (vo_frame_t *)av_frame->opaque;
+
+ img->free(img);
+ }
+
xine_list_iterator_t it;
- assert(av_frame->opaque);
- img->free(img);
-
it = xine_list_find(this->dr1_frames, av_frame);
assert(it);
if( it != NULL )