DVR: Fix the wrong memory access

Note that dvr_thread() uses the de->de_s contents which is
freed in subscription_unsubscribe().

Move the subscription_unsubscribe() as last.
This commit is contained in:
Jaroslav Kysela 2014-09-17 11:43:51 +02:00
parent 2e017d6b64
commit a766245f8a

View file

@ -104,11 +104,11 @@ dvr_rec_unsubscribe(dvr_entry_t *de, int stopcode)
{
assert(de->de_s != NULL);
subscription_unsubscribe(de->de_s);
streaming_target_deliver(&de->de_sq.sq_st, streaming_msg_create(SMT_EXIT));
pthread_join(de->de_thread, NULL);
subscription_unsubscribe(de->de_s);
de->de_s = NULL;
if(de->de_tsfix)