summaryrefslogtreecommitdiff
path: root/plugins/ffmpeg/ffmpeg.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-28 20:08:24 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-04-28 20:08:24 +0200
commit491cf37413966c33b90edf59614665278011fa66 (patch)
tree9e8adf0b937d71c308b0c066000a4a9d94ba45a3 /plugins/ffmpeg/ffmpeg.c
parent630b3b8174953f195dbc984210916196a9eb1cb7 (diff)
fix random segfault in ffmpeg plugin
Diffstat (limited to 'plugins/ffmpeg/ffmpeg.c')
-rw-r--r--plugins/ffmpeg/ffmpeg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c
index 73a05f5f..af03cb11 100644
--- a/plugins/ffmpeg/ffmpeg.c
+++ b/plugins/ffmpeg/ffmpeg.c
@@ -202,6 +202,7 @@ ffmpeg_init (DB_playItem_t *it) {
static void
ffmpeg_free (DB_fileinfo_t *_info) {
+ trace ("ffmpeg: free\n");
ffmpeg_info_t *info = (ffmpeg_info_t*)_info;
if (info) {
if (info->buffer) {
@@ -211,12 +212,12 @@ ffmpeg_free (DB_fileinfo_t *_info) {
if (info->have_packet) {
av_free_packet (&info->pkt);
}
- if (info->fctx) {
- av_close_input_file (info->fctx);
- }
if (info->ctx) {
avcodec_close (info->ctx);
}
+ if (info->fctx) {
+ av_close_input_file (info->fctx);
+ }
free (info);
}
}