media: fix bug in server-side