diff --git a/mythtv/libs/libmythtv/privatedecoder_omx.cpp b/mythtv/libs/libmythtv/privatedecoder_omx.cpp
index 8914a52..cdf0dc1 100644
a
|
b
|
bool PrivateDecoderOMX::Reset(void) |
714 | 714 | |
715 | 715 | m_bStartTime = false; |
716 | 716 | |
717 | | if (m_bSettingsHaveChanged) |
718 | | { |
719 | | // Flush input |
720 | | OMX_ERRORTYPE e; |
721 | | e = m_videc.SendCommand(OMX_CommandFlush, m_videc.Base(), 0, 50); |
722 | | if (e != OMX_ErrorNone) |
723 | | return false; |
| 717 | // Flush input |
| 718 | OMX_ERRORTYPE e; |
| 719 | e = m_videc.SendCommand(OMX_CommandFlush, m_videc.Base(), 0, 50); |
| 720 | if (e != OMX_ErrorNone) |
| 721 | return false; |
724 | 722 | |
725 | | // Flush output |
726 | | e = m_videc.SendCommand(OMX_CommandFlush, m_videc.Base() + 1, 0, 50); |
727 | | if (e != OMX_ErrorNone) |
728 | | return false; |
| 723 | // Flush output |
| 724 | e = m_videc.SendCommand(OMX_CommandFlush, m_videc.Base() + 1, 0, 50); |
| 725 | if (e != OMX_ErrorNone) |
| 726 | return false; |
729 | 727 | |
730 | | if (m_avctx && m_avctx->get_buffer2) |
731 | | { |
732 | | // Request new buffers when GetFrame is next called |
733 | | m_bSettingsChanged = true; |
734 | | } |
735 | | else |
736 | | { |
737 | | // Re-submit the empty output buffers |
738 | | FillOutputBuffers(); |
739 | | } |
| 728 | if (m_avctx && m_avctx->get_buffer2) |
| 729 | { |
| 730 | // Request new buffers when GetFrame is next called |
| 731 | QMutexLocker lock(&m_lock); |
| 732 | m_bSettingsChanged = true; |
| 733 | } |
| 734 | else |
| 735 | { |
| 736 | // Re-submit the empty output buffers |
| 737 | FillOutputBuffers(); |
740 | 738 | } |
741 | 739 | |
742 | 740 | LOG(VB_PLAYBACK, LOG_DEBUG, LOC + __func__ + " - end"); |
… |
… |
int PrivateDecoderOMX::GetFrame( |
765 | 763 | |
766 | 764 | // Check for OMX_EventPortSettingsChanged notification |
767 | 765 | if (SettingsChanged(stream->codec) != OMX_ErrorNone) |
| 766 | { |
| 767 | // PGB If there was an error, discard this packet |
| 768 | *got_picture_ptr = 0; |
768 | 769 | return -1; |
| 770 | } |
769 | 771 | |
770 | | // Submit a packet for decoding |
771 | | return (pkt && pkt->size) ? ProcessPacket(stream, pkt) : 0; |
| 772 | // PGB If settings have changed, discard this one packet |
| 773 | QMutexLocker lock(&m_lock); |
| 774 | if (m_bSettingsHaveChanged) |
| 775 | { |
| 776 | m_bSettingsHaveChanged = false; |
| 777 | *got_picture_ptr = 0; |
| 778 | return -1; |
| 779 | } |
| 780 | else |
| 781 | { |
| 782 | // Submit a packet for decoding |
| 783 | lock.unlock(); |
| 784 | return (pkt && pkt->size) ? ProcessPacket(stream, pkt) : 0; |
| 785 | } |
772 | 786 | } |
773 | 787 | |
774 | 788 | // Submit a packet for decoding |