Fix the EOS hang and jerkiness in playback.
Fix the EOS hang and jerkiness in playback.

- output_picture_ should be cleared only after 
freeing the output buffers.

- pop out free_input_buffers_ in Flush. This was missing
and creates failure during FreeInputBuffers()

- new picture_buffers to be pushed back into
assigned_picture_buffers_. 
Otherwise display gets wrong texture

These changes will fix the hang at EOS.

BUG=none
TEST=gpu_video_tests

Review URL: http://codereview.chromium.org/7017006

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@86254 0039d316-1c4b-4281-b951-d872f2087c98

anirudhSK/chromium,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,markYoungH/chromium.src,rogerwang/chromium,dushu1203/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,Fireblend/chromium-crosswalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk,robclark/chromium,ondra-novak/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,rogerwang/chromium,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,hujiajie/pa-chromium,keishi/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,rogerwang/chromium,ltilve/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,nacl-webkit/chrome_deps,Just-D/chromium-1,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,hgl888/chromium-crosswalk,littlstar/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,dednal/chromium.src,bright-sparks/chromium-spacewalk,jaruba/chromium.src,ChromiumWebApps/chromium,Jonekee/chromium.src,Chilledheart/chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,ltilve/chromium,jaruba/chromium.src,M4sse/chromium.src,patrickm/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,jaruba/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,jaruba/chromium.src,keishi/chromium,dushu1203/chromium.src,Just-D/chromium-1,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,anirudhSK/chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,rogerwang/chromium,keishi/chromium,zcbenz/cefode-chromium,robclark/chromium,mogoweb/chromium-crosswalk,rogerwang/chromium,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,dednal/chromium.src,krieger-od/nwjs_chromium.src,patrickm/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,rogerwang/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,patrickm/chromium.src,dednal/chromium.src,robclark/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,robclark/chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,ltilve/chromium,mogoweb/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,littlstar/chromium.src,axinging/chromium-crosswalk,keishi/chromium,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,markYoungH/chromium.src,rogerwang/chromium,robclark/chromium,PeterWangIntel/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,timopulkkinen/BubbleFish,rogerwang/chromium,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,robclark/chromium,rogerwang/chromium,axinging/chromium-crosswalk,robclark/chromium,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,ltilve/chromium,Jonekee/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,Jonekee/chromium.src,rogerwang/chromium,dushu1203/chromium.src,fujunwei/chromium-crosswalk