multi-res: work around reference mismatch
multi-res: work around reference mismatch

In some situations, believed to be an interaction between temporal
scalability and dropped frames, the references available to an
encoder may not be the same references available to its parent.
Previously, the code tried to force the reference frame chosen by
the parent to be used on this frame, even if it was disabled. This
was preventing the pick mode loop from running even once, which led
to a crash.

Attempts to reproduce this bug locally were unsuccessful, so it is
still undetermined what the underlying cause of this issue is. In
the specific case that was failing, the application did not set
any flags which influenced the reference selection on that frame.
ref_frame_flags indicated that the golden frame was disabled,
believed to be because the last frame updated the last and golden
frames, so golden was shut off by default. It's not clear why this
wouldn't have also been true in the lower res encoder, ie, why the
lower res encoder decided to use and/or was allowed to use the
golden frame. We weren't able to debug into the non-crashing
lower res encoder as the crash couldn't be reproduced locally.

Change-Id: Ifb265253d26963ac2afde0e20cf6792788be6af7

altogother/webm.libvpx,matanbs/webm.libvpx,abwiz0086/webm.libvpx,liqianggao/libvpx,jmvalin/aom,shyamalschandra/libvpx,iniwf/webm.libvpx,luctrudeau/aom,altogother/webm.libvpx,zofuthan/libvpx,lyx2014/libvpx_c,goodleixiao/vpx,kleopatra999/webm.libvpx,webmproject/libvpx,kalli123/webm.libvpx,Laknot/libvpx,turbulenz/libvpx,pcwalton/libvpx,mwgoldsmith/vpx,lyx2014/libvpx_c,gshORTON/webm.libvpx,matanbs/vp982,VTCSecureLLC/libvpx,liqianggao/libvpx,vasilvv/esvp8,luctrudeau/aom,mbebenita/aom,Suvarna1488/webm.libvpx,jmvalin/aom,ittiamvpx/libvpx-1,pcwalton/libvpx,hsueceumd/test_hui,Acidburn0zzz/webm.libvpx,VTCSecureLLC/libvpx,n4t/libvpx,jacklicn/webm.libvpx,thdav/aom,charup/https---github.com-webmproject-libvpx-,thdav/aom,GrokImageCompression/aom,gshORTON/webm.libvpx,reimaginemedia/webm.libvpx,mbebenita/aom,Suvarna1488/webm.libvpx,charup/https---github.com-webmproject-libvpx-,VTCSecureLLC/libvpx,openpeer/libvpx_new,mwgoldsmith/libvpx,shacklettbp/aom,zofuthan/libvpx,matanbs/webm.libvpx,cinema6/libvpx,n4t/libvpx,mwgoldsmith/libvpx,kim42083/webm.libvpx,jdm/libvpx,pcwalton/libvpx,mwgoldsmith/vpx,shyamalschandra/libvpx,webmproject/libvpx,mbebenita/aom,kalli123/webm.libvpx,Laknot/libvpx,iniwf/webm.libvpx,Suvarna1488/webm.libvpx,smarter/aom,Topopiccione/libvpx,stewnorriss/libvpx,luctrudeau/aom,turbulenz/libvpx,jmvalin/aom,Maria1099/webm.libvpx,vasilvv/esvp8,vasilvv/esvp8,kalli123/webm.libvpx,felipebetancur/libvpx,pcwalton/libvpx,mbebenita/aom,felipebetancur/libvpx,zofuthan/libvpx,smarter/aom,kim42083/webm.libvpx,matanbs/vp982,mwgoldsmith/vpx,gshORTON/webm.libvpx,running770/libvpx,vasilvv/esvp8,Topopiccione/libvpx,abwiz0086/webm.libvpx,thdav/aom,kalli123/webm.libvpx,kim42083/webm.libvpx,mbebenita/aom,jacklicn/webm.libvpx,smarter/aom,jdm/libvpx,VTCSecureLLC/libvpx,cinema6/libvpx,sanyaade-teachings/libvpx,jacklicn/webm.libvpx,Maria1099/webm.libvpx,charup/https---github.com-webmproject-libvpx-,openpeer/libvpx_new,reimaginemedia/webm.libvpx,jmvalin/aom,hsueceumd/test_hui,WebRTC-Labs/libvpx,Distrotech/libvpx,altogother/webm.libvpx,jmvalin/aom,shacklettbp/aom,matanbs/vp982,running770/libvpx,altogother/webm.libvpx,webmproject/libvpx,Maria1099/webm.libvpx,Laknot/libvpx,iniwf/webm.libvpx,luctrudeau/aom,sanyaade-teachings/libvpx,matanbs/webm.libvpx,luctrudeau/aom,abwiz0086/webm.libvpx,shyamalschandra/libvpx,GrokImageCompression/aom,ShiftMediaProject/libvpx,mwgoldsmith/libvpx,abwiz0086/webm.libvpx,WebRTC-Labs/libvpx,mwgoldsmith/vpx,shyamalschandra/libvpx,hsueceumd/test_hui,turbulenz/libvpx,smarter/aom,running770/libvpx,jmvalin/aom,VTCSecureLLC/libvpx,GrokImageCompression/aom,running770/libvpx,ShiftMediaProject/libvpx,shareefalis/libvpx,mbebenita/aom,goodleixiao/vpx,running770/libvpx,zofuthan/libvpx,shacklettbp/aom,webmproject/libvpx,stewnorriss/libvpx,cinema6/libvpx,n4t/libvpx,Acidburn0zzz/webm.libvpx,WebRTC-Labs/libvpx,reimaginemedia/webm.libvpx,mbebenita/aom,kleopatra999/webm.libvpx,abwiz0086/webm.libvpx,running770/libvpx,shareefalis/libvpx,Acidburn0zzz/webm.libvpx,mwgoldsmith/vpx,smarter/aom,jdm/libvpx,turbulenz/libvpx,Suvarna1488/webm.libvpx,goodleixiao/vpx,lyx2014/libvpx_c,Maria1099/webm.libvpx,kim42083/webm.libvpx,shacklettbp/aom,stewnorriss/libvpx,turbulenz/libvpx,gshORTON/webm.libvpx,felipebetancur/libvpx,vasilvv/esvp8,charup/https---github.com-webmproject-libvpx-,luctrudeau/aom,pcwalton/libvpx,ittiamvpx/libvpx-1,ittiamvpx/libvpx,n4t/libvpx,altogother/webm.libvpx,kim42083/webm.libvpx,Distrotech/libvpx,ShiftMediaProject/libvpx,Distrotech/libvpx,sanyaade-teachings/libvpx,openpeer/libvpx_new,ittiamvpx/libvpx,ittiamvpx/libvpx,lyx2014/libvpx_c,thdav/aom,zofuthan/libvpx,GrokImageCompression/aom,felipebetancur/libvpx,openpeer/libvpx_new,felipebetancur/libvpx,hsueceumd/test_hui,cinema6/libvpx,webmproject/libvpx,mwgoldsmith/libvpx,turbulenz/libvpx,gshORTON/webm.libvpx,shareefalis/libvpx,reimaginemedia/webm.libvpx,lyx2014/libvpx_c,matanbs/webm.libvpx,Suvarna1488/webm.libvpx,altogother/webm.libvpx,mwgoldsmith/libvpx,jacklicn/webm.libvpx,mbebenita/aom,iniwf/webm.libvpx,smarter/aom,liqianggao/libvpx,matanbs/vp982,vasilvv/esvp8,liqianggao/libvpx,openpeer/libvpx_new,openpeer/libvpx_new,kleopatra999/webm.libvpx,mwgoldsmith/libvpx,kim42083/webm.libvpx,shacklettbp/aom,charup/https---github.com-webmproject-libvpx-,ittiamvpx/libvpx-1,Laknot/libvpx,GrokImageCompression/aom,kleopatra999/webm.libvpx,shyamalschandra/libvpx,Topopiccione/libvpx,ShiftMediaProject/libvpx,reimaginemedia/webm.libvpx,Laknot/libvpx,turbulenz/libvpx,reimaginemedia/webm.libvpx,mwgoldsmith/vpx,matanbs/webm.libvpx,ittiamvpx/libvpx-1,sanyaade-teachings/libvpx,kalli123/webm.libvpx,thdav/aom,sanyaade-teachings/libvpx,Acidburn0zzz/webm.libvpx,jdm/libvpx,jacklicn/webm.libvpx,ittiamvpx/libvpx-1,ittiamvpx/libvpx,stewnorriss/libvpx,Acidburn0zzz/webm.libvpx,turbulenz/libvpx,liqianggao/libvpx,jdm/libvpx,Maria1099/webm.libvpx,jdm/libvpx,Distrotech/libvpx,mbebenita/aom,WebRTC-Labs/libvpx,Acidburn0zzz/webm.libvpx,vasilvv/esvp8,shareefalis/libvpx,Topopiccione/libvpx,goodleixiao/vpx,kleopatra999/webm.libvpx,goodleixiao/vpx,ittiamvpx/libvpx-1,shareefalis/libvpx,VTCSecureLLC/libvpx,matanbs/vp982,GrokImageCompression/aom,webmproject/libvpx,shyamalschandra/libvpx,pcwalton/libvpx,Distrotech/libvpx,hsueceumd/test_hui,iniwf/webm.libvpx,Topopiccione/libvpx,zofuthan/libvpx,Distrotech/libvpx,hsueceumd/test_hui,kleopatra999/webm.libvpx,jacklicn/webm.libvpx,cinema6/libvpx,turbulenz/libvpx,matanbs/webm.libvpx,n4t/libvpx,lyx2014/libvpx_c,ittiamvpx/libvpx,Topopiccione/libvpx,abwiz0086/webm.libvpx,shareefalis/libvpx,Maria1099/webm.libvpx,liqianggao/libvpx,felipebetancur/libvpx,ittiamvpx/libvpx,iniwf/webm.libvpx,ShiftMediaProject/libvpx,charup/https---github.com-webmproject-libvpx-,matanbs/vp982,gshORTON/webm.libvpx,WebRTC-Labs/libvpx,goodleixiao/vpx,matanbs/vp982,Suvarna1488/webm.libvpx,cinema6/libvpx,stewnorriss/libvpx,cinema6/libvpx,thdav/aom,stewnorriss/libvpx,kalli123/webm.libvpx,shacklettbp/aom,Laknot/libvpx