refer:https://software.intel.com/en-us/forums/topic/389609
The Media SDK decode sample should handle this case by default without the need to reset the pipeline. But this assumes that the new resolution is smaller
(W and H) so that the new decoded frames fits on the pre-allocated surfaces for decode. If the new resolution is greater than the frames size allocated at pipeline initialization, then the application must restart decoder, free surfaces, and then allocate
surfaces that can fit the new frame resolution.
you can refer: http://developer.android.com/reference/android/media/MediaCodec.html
or http://stackoverflow.com/questions/22820668/mediacodec-resolution-change-in-video-stream-causes-decoder-acodec-to-assert
本文讨论了当视频流中出现分辨率变化时,如何调整MediaCodec以适应新的分辨率要求。如果新的分辨率小于初始化时分配的帧大小,则通常不需要重启解码器。然而,若新分辨率大于已分配表面的尺寸,则必须重新启动解码器并分配适合新分辨率的表面。
154

被折叠的 条评论
为什么被折叠?



