         }
 
         /* in case of parsing error,
-            first, try to switch to redundant stream if any
+            first, try to flush any tags that might have been injected in the NetStream
+            then switch to redundant stream if any
+            OR level switch down and cap level if in auto mode
             OR skip fragment if allowed to
             if not allowed to, report PARSING error
         */
         private function _fragHandleParsingError(message : String) : void {
             var hlsError : HLSError = new HLSError(HLSError.FRAGMENT_PARSING_ERROR, _fragCurrent.url, "Parsing Error :" + message);
+            var level : Level = _levels[_fragCurrent.level];
             CONFIG::LOGGING {
                 Log.warn(hlsError.msg);
             }
+            // flush any tags that might have been injected for this fragment
+            _streamBuffer.flushLastFragment(_fragCurrent.level,_fragCurrent.seqnum);
             _hls.dispatchEvent(new HLSEvent(HLSEvent.WARNING, hlsError));
-            var level : Level = _levels[_fragCurrent.level];
             // if we have redundant streams left for that level, switch to it
             if(level.redundantStreamId < level.redundantStreamsNb) {
                 CONFIG::LOGGING {

                _loadingState = LOADING_IDLE;
                // dispatch event to force redundant level loading
                _hls.dispatchEvent(new HLSEvent(HLSEvent.LEVEL_SWITCH, _fragCurrent.level));
            } else if(HLSSettings.fragmentLoadSkipAfterMaxRetry == true) {
                CONFIG::LOGGING {
                    Log.warn("error parsing fragment, skip it and load next one");

                    _loadingState = LOADING_IDLE;
                    // dispatch event to force redundant level loading
                    _hls.dispatchEvent(new HLSEvent(HLSEvent.LEVEL_SWITCH, _fragCurrent.level));
                } else if(_hls.autoLevel && _fragCurrent.level) {
                    // auto level and not on level 0, try to switch down for next fragment, and cap level to avoid coming back on this one
                    _levelNext = _fragCurrent.level-1;
                    if(_hls.autoLevelCapping == -1) {
                        _hls.autoLevelCapping = _levelNext;
                    } else {
                        _hls.autoLevelCapping = Math.min(_levelNext,_hls.autoLevelCapping);
                    }
                    // switch back to IDLE state to request new fragment at lowest level
                    _loadingState = LOADING_IDLE;
                } else if(HLSSettings.fragmentLoadSkipAfterMaxRetry == true) {
                    /* check if loaded fragment is not the last one of a live playlist.
                        if it is the case, don't skip to next, as there is no next fragment :-)
