Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
v4l2_dec: fix display error in mode '-m 4'
Browse files Browse the repository at this point in the history
Add one more format parameter to EglOutput's constructor function to set
memory-type to m_memoryType.

Signed-off-by: wudping <[email protected]>
  • Loading branch information
dongpingx authored and xuguangxin committed Apr 19, 2017
1 parent 33cf6da commit b0e2ecf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v4l2/v4l2_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,9 @@ class ExternalDmaBufOutput : public ExternalBufferOutput {
#include "egl/egl_vaapi_image.h"
class EglOutput : public V4l2Decoder::Output {
public:
EglOutput(V4l2Decoder* decoder)
EglOutput(V4l2Decoder* decoder, VideoDataMemoryType memory_type)
: V4l2Decoder::Output(decoder)
, m_memoryType(VIDEO_DATA_MEMORY_TYPE_DRM_NAME)
, m_memoryType(memory_type)
{
}
virtual int32_t requestBuffers(uint32_t count)
Expand Down Expand Up @@ -1266,7 +1266,7 @@ int32_t V4l2Decoder::setFrameMemoryType(VideoDataMemoryType memory_type)
#ifdef __ENABLE_EGL__
if (memory_type == VIDEO_DATA_MEMORY_TYPE_DRM_NAME
|| memory_type == VIDEO_DATA_MEMORY_TYPE_DMA_BUF)
m_output.reset(new EglOutput(this));
m_output.reset(new EglOutput(this, memory_type));
#endif
if (!m_output) {
ERROR("unspported memory type %d", memory_type);
Expand Down

0 comments on commit b0e2ecf

Please sign in to comment.