                 } else if (typ == 0x1B) {
                     // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video)
                     if(_audioOnly == false) {
-                        _avcId = sid;
-                        CONFIG::LOGGING {
-                            Log.debug("TS: Selected video PID: " + _avcId);
+                        if(_avcId != sid) {
+                            _avcId = sid;
+                            CONFIG::LOGGING {
+                                Log.debug("TS: Selected video PID: " + _avcId);
+                            }
                         }
                     } else {
                         CONFIG::LOGGING {

                    audioList.push(new AudioTrack('TS/MP3 ' + audioList.length, AudioTrack.FROM_DEMUX, sid, (audioList.length == 0), false));
                } else if (typ == 0x15) {
                    // ID3 pid
                    _id3Id = sid;
                    CONFIG::LOGGING {
                        Log.debug("TS: Selected ID3 PID: " + _id3Id);
                    }
                }
                // es_info_length

                    pes.data.readBytes(pps, 0, frame.length);
                    ppsvect.push(pps);
                } else if (frame.type == 6) {

					//unescape Emulation Prevention bytes
					Nalu.unescapeStream(pes.data,frame.start,frame.start + frame.length);

					// We already know it's 6, so skip first byte
					pes.data.position = frame.start + 1;

					// we need at least 12 bytes to retrieve Caption length
					if(pes.data.bytesAvailable > 12) {

						// get the SEI payload type
						var payload_type : uint = 0;
						var payload_size : uint = 0;
