Based on gmediarender-resurrect, OpenWrt-gmediarender and various patches on the OpenWRT patch tracker.
This HOWTO assumes that you already have a configured OpenWRT Buildroot or SDK
cd openwrt/trunk
./scripts/feeds update -a
./scripts/feeds install -a
cd feeds/packages
patch -p1 < <path to patchfile>
cd ../..
./scripts/feeds update -i
./scripts/feeds install <package name>
make menuconfig
// Select appropriate package
make package/<package name>/compile V=s
make package/<package name>/install V=s
make package/index
The patches for gst1-plugins-bad and gst1-plugins-ugly are untested and only included for the sake of completeness.
For a more detailled description of what this is good for, see my blog