+ hr = IWICBitmapFrameDecode_QueryInterface(frame, &IID_IWICBitmapSource, (void**)&bmp_source);
FrameDecode inherits Source so I don't think this is necessary?
None of this seems obviously wrong to me, but it is complicated and interesting behavior. I'm not sure if I understand it all.